﻿<?xml version="1.0" encoding="UTF-8"?>
<!--RSS generated by Windows SharePoint Services V3 RSS Generator on 9/10/2010 2:40:57 PM-->
<?xml-stylesheet type="text/xsl" href="/mark/_layouts/RssXslt.aspx?List=c0001cfc-d84a-4be0-b437-6a625925a9d5" version="1.0"?>
<rss version="2.0">
  <channel>
    <title>Mark Wagner's Cogitation Blog</title>
    <link>http://www.crsw.com/mark/Lists/Posts/AllPosts.aspx</link>
    <description>Mark Wagner is employed by Microsoft working in the West Region. He specializes in Microsoft .NET and SharePoint technologies.</description>
    <copyright>Copyright 2004-2008 Mark Wagner</copyright>
    <lastBuildDate>Fri, 10 Sep 2010 20:40:57 GMT</lastBuildDate>
    <generator>Windows SharePoint Services V3 RSS Generator</generator>
    <ttl>60</ttl>
    <image>
      <title>Mark Wagner - Cogitation Blog: Posts</title>
      <url>/mark/_layouts/images/homepage.gif</url>
      <link>http://www.crsw.com/mark/Lists/Posts/AllPosts.aspx</link>
    </image>
    <item>
      <title>How to setup Meet Now for LiveMeeting 2007</title>
      <link>http://www.crsw.com/mark/Lists/Posts/ViewPost.aspx?ID=98</link>
      <description><![CDATA[<div><b>Body:</b> <div class=ExternalClass53904DC2F6FE4D5EA7A112BA340107BC>
<div>
<div class=ms-PostBody>Summary: This article discusses how to configure and use the Meet Now feature in LiveMeeting 2007. 
<div>
<div class=ExternalClassAC742DA60C6C4EBDBCCBDAEB97038FD1>
<div class=ExternalClass0EC4B1B629A44F21ADB4308F67BF7082>
<div class=ExternalClass3EE96154D78A446190E01C7FD2565E6B>
<ol>
<li>Start the <strong>LiveMeeting </strong>rich client desktop application.<br>Note: You will most likely not see the Meet Now button on your screen, yet. <br>  
<li>Click the options menu link in the upper right corner.<br>  
<li>Select the “<strong>Open User Accounts</strong>” menu option. <br>  
<li>Enter the following information:  
<ol>
<li>URL: <strong>https://www.livemeeting.com/cc/YOUR COMPANY</strong> 
<li>Check the “<strong>I enter a user name and password…</strong>”. 
<li>Enter your LiveMeeting web site user name and password.<br> </li></ol>
<li>Click the <strong>Test Connection </strong>button. You should see the following success message:  
<ol>
<li>Click <strong>OK </strong>to close this message box.<br></li></ol>
<li>Click <strong>OK </strong>on the User Accounts dialog to close.<br>  
<li>You should now be returned to the main Live Meeting welcome screen.<br>  
<li>Click on the “<strong>Meet Now Options</strong>” link.<br>  
<li>Your <strong>LiveMeeting Meet Now Options </strong>window should be displayed. <br>  
<li>Make any changes to set your preferences. I use the following configurations options: 
<ol>
<li>In the <strong>Entry Control</strong> section: 
<ol>
<li>I use a custom/fixed <strong>Meeting Key</strong> for both the Presenter and Attendee roles. I do this only because I also enable the Meeting Lobby.</li></ol>
<li>Under the <strong>Meeting Lobby</strong> section:<br><strong>Note:</strong> You may need login to your LiveMeeting account using your web browser to configure this <strong>Meeting Lobby</strong> option. It appears to be disabled in this dialog at the time of this posting. 
<ol>
<li>I enable/check the <strong>Meeting Lobby</strong>. This allows me to selectively grant users access to my Meet Now meetings while keeping a consistent and easy to remember meeting key for me and my clients. It also allows me to create a consistent URL for my Meet Now email signature link. See my post on <a href="/mark/Lists/Posts/Post.aspx?ID=54">Create a Live Meeting ‘Meet Now’ link in your email signature</a>. This has proven to be very convenient for me and my clients.</li></ol>
<li>Click <strong>OK</strong> or <strong>Cancel</strong> to close the options dialog.<br> </li></ol>
<li>Now, when you start your LiveMeeting rich client application, you can simply click the “Meet Now” button to start a new LiveMeeting and instantly have Meet Now session ready to use. </li>
<ol>
<li>Click “Continue” on the standard notice message.</li></ol></ol></div></div></div></div></div></div></div></div>
<div><b>Published:</b> 3/15/2010 8:29 PM</div>
<div><b>Title:</b> How to setup Meet Now for LiveMeeting 2007</div>
]]></description>
      <author>Mark Wagner</author>
      <pubDate>Sat, 28 Aug 2010 17:31:14 GMT</pubDate>
      <guid isPermaLink="true">http://www.crsw.com/mark/Lists/Posts/ViewPost.aspx?ID=98</guid>
    </item>
    <item>
      <title>Source Control Explorer is disabled, grayed out</title>
      <link>http://www.crsw.com/mark/Lists/Posts/ViewPost.aspx?ID=99</link>
      <description><![CDATA[<div><b>Body:</b> <div class=ExternalClass7EAEC5828B5A40F085BB870D7B03899D><div>
<div class=ExternalClass30F3ED33E1304059A2346071C2682831>If your Source Control Explorer menu link is disabled (grayed out) you need to be sure the default source control plug-in for Visual Studio is set to Team Foundation Server.</div>
<div class=ExternalClass30F3ED33E1304059A2346071C2682831> </div>
<div class=ExternalClass30F3ED33E1304059A2346071C2682831>This is usually just a simple oversight for most of us that use TFS quite often. But since this has happened to me more than once and I don't seem to remember the fix as quickly as I would like, I have noted it here for easy recall and for anyone else.</div>
<div class=ExternalClass30F3ED33E1304059A2346071C2682831>
<ol>
<li>Open Visual Studio 
<li>Select the menu: <strong>Tools</strong> &gt; <strong>Options</strong> 
<li>In the Options dialog select: <strong>Source Control</strong> &gt; <strong>Plug-In Selections</strong> 
<li>Select <strong>Visual Studio Team Foundation Server</strong></li></ol></div>
<p>Keywords: TFS</p></div></div></div>
<div><b>Published:</b> 8/2/2010 8:31 PM</div>
<div><b>Title:</b> Source Control Explorer is disabled, grayed out</div>
]]></description>
      <author>Mark Wagner</author>
      <pubDate>Sat, 28 Aug 2010 17:32:09 GMT</pubDate>
      <guid isPermaLink="true">http://www.crsw.com/mark/Lists/Posts/ViewPost.aspx?ID=99</guid>
    </item>
    <item>
      <title>Create Custom SharePoint Web Service WSDL and Disco ASPX Files Automatically</title>
      <link>http://www.crsw.com/mark/Lists/Posts/ViewPost.aspx?ID=57</link>
      <description><![CDATA[<div><b>Body:</b> <div class=ExternalClassAE5A096F0EC64B22B3E68D1CFCC47C19>
<div class=ExternalClass58C6B37344E74DE29B2EF0B972FBAF12>
<div class=ExternalClass399162BA9FCC41F4A1AEF2DFF2DBEECA>
<div class=ExternalClassA3A79550573041FAADF328B31F9BAE45><font size=2><strong><font color="#ff0000" size=4>Update:</font></strong> The details for this posting have been <font color="#ff0000">moved</font> to its own site <strong><a href="/spdev/Wiki%20Pages/GenWS.aspx">here</a></strong>.</font></div>
<div class=ExternalClassA3A79550573041FAADF328B31F9BAE45> </div>
<div class=ExternalClassA3A79550573041FAADF328B31F9BAE45>I just completed a SharePoint developer tool called <strong>SPDev.exe.</strong> The initial purpose of this utility is to auto-generate the web service WSDL.aspx and Disco.aspx files needed for a custom SharePoint web service.</div>
<div class=ExternalClassA3A79550573041FAADF328B31F9BAE45>
<blockquote class=ExternalClass0E5B17B29D764C9FBD086F175AC2BB03>
<div class=ExternalClassA3A79550573041FAADF328B31F9BAE45><font color="#ff0000"><img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px" title="icon_shout_10" border=0 alt="icon_shout_10" src="/mark/Lists/Posts/Attachments/57/icon_shout_10_thumb_355AFAE4.gif" width=23 height=15> Automatically generate your SharePoint disco.aspx and wsdl.aspx files in <u>seconds</u>!</font></div>
<div class=ExternalClassA3A79550573041FAADF328B31F9BAE45><font color="#ff0000"><img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px" title="icon_shout_10" border=0 alt="icon_shout_10" src="/mark/Lists/Posts/Attachments/57/icon_shout_10_thumb_355AFAE4.gif" width=23 height=15> No need to manually copy or deploy your .asmx first!</font></div>
<div class=ExternalClassA3A79550573041FAADF328B31F9BAE45><font color="#ff0000"><img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px" title="icon_shout_10" border=0 alt="icon_shout_10" src="/mark/Lists/Posts/Attachments/57/icon_shout_10_thumb_355AFAE4.gif" width=23 height=15> No manual editing!</font></div>
<div class=ExternalClassA3A79550573041FAADF328B31F9BAE45><font color="#ff0000"><img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px" title="icon_shout_10" border=0 alt="icon_shout_10" src="/mark/Lists/Posts/Attachments/57/icon_shout_10_thumb_355AFAE4.gif" width=23 height=15> No Disco.exe needed!</font></div>
<div class=ExternalClassA3A79550573041FAADF328B31F9BAE45><font color="#ff0000"><img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px" title="icon_shout_10" border=0 alt="icon_shout_10" src="/mark/Lists/Posts/Attachments/57/icon_shout_10_thumb_355AFAE4.gif" width=23 height=15> Automatically recycles the application pool (ensuring the newest assembly is loaded)!</font></div>
<div class=ExternalClassA3A79550573041FAADF328B31F9BAE45><font color="#ff0000"><img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px" title="icon_shout_10" border=0 alt="icon_shout_10" src="/mark/Lists/Posts/Attachments/57/icon_shout_10_thumb_355AFAE4.gif" width=23 height=15> Automatically deploys the final SharePoint web service files (using the -deploy option)!</font></div>
<div class=ExternalClassA3A79550573041FAADF328B31F9BAE45><font color="#ff0000"><img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px" title="icon_shout_10" border=0 alt="icon_shout_10" src="/mark/Lists/Posts/Attachments/57/icon_shout_10_thumb_355AFAE4.gif" width=23 height=15> </font><font color="#ff0000">No UI to enter data each time.  A command tool you can script for fast, consistent re-use!</font></div></blockquote>
<p class=ExternalClassA3A79550573041FAADF328B31F9BAE45>After having to manually modify the disco.aspx and wsdl.aspx files by hand for the last three years, I finally found it tedious enough to create this utility.  There are other tools out there, but they require you to enter information into a Windows UI, they are not script-able, and still felt to tedious for me.  Call me lazy.  :)  Time is money.  This tool is a command line utility.  Simply execute the <strong>SPDev.exe</strong> command and your MyServiceDisco.aspx and MyServiceWsdl.aspx files are immediately ready for deployment.  SPDev also allows you to script the process.  Create a .cmd or .bat file and you’ll never have to enter any parameters again.  Another big benefit is you don't need to use the Disco.exe utility since SPDev uses IIS and .NET instead which will always be on your development machine - since you are developing for SharePoint.  And, there are no temp files are generated (unless you want them generated).</p>
<p class=ExternalClassA3A79550573041FAADF328B31F9BAE45><strong><font color="#ff0000" size=4>Update:</font></strong><font size=2> The details for this posting have been <font color="#ff0000">moved</font> to its own site <strong><a href="/spdev/Wiki%20Pages/GenWS.aspx">here</a></strong>.</font></p></div></div></div></div></div>
<div><b>Category:</b> SharePoint;Web Services;Tools</div>
<div><b>Published:</b> 4/18/2009 2:25 AM</div>
<div><b>Title:</b> Create Custom SharePoint Web Service WSDL and Disco ASPX Files Automatically</div>
<div><b>Attachments:</b> <a href="http://www.crsw.com/mark/Lists/Posts/Attachments/57/ad_2_25ED38E6.gif">http://www.crsw.com/mark/Lists/Posts/Attachments/57/ad_2_25ED38E6.gif</a><br><a href="http://www.crsw.com/mark/Lists/Posts/Attachments/57/ad_thumb_25ED38E6.gif">http://www.crsw.com/mark/Lists/Posts/Attachments/57/ad_thumb_25ED38E6.gif</a><br><a href="http://www.crsw.com/mark/Lists/Posts/Attachments/57/download_2_4264D257.gif">http://www.crsw.com/mark/Lists/Posts/Attachments/57/download_2_4264D257.gif</a><br><a href="http://www.crsw.com/mark/Lists/Posts/Attachments/57/download_thumb_4264D257.gif">http://www.crsw.com/mark/Lists/Posts/Attachments/57/download_thumb_4264D257.gif</a><br><a href="http://www.crsw.com/mark/Lists/Posts/Attachments/57/ico_check_blu_2_43223A4D.gif">http://www.crsw.com/mark/Lists/Posts/Attachments/57/ico_check_blu_2_43223A4D.gif</a><br><a href="http://www.crsw.com/mark/Lists/Posts/Attachments/57/ico_check_blu_thumb_43223A4D.gif">http://www.crsw.com/mark/Lists/Posts/Attachments/57/ico_check_blu_thumb_43223A4D.gif</a><br><a href="http://www.crsw.com/mark/Lists/Posts/Attachments/57/icon_shout_10_2_355AFAE4.gif">http://www.crsw.com/mark/Lists/Posts/Attachments/57/icon_shout_10_2_355AFAE4.gif</a><br><a href="http://www.crsw.com/mark/Lists/Posts/Attachments/57/icon_shout_10_thumb_355AFAE4.gif">http://www.crsw.com/mark/Lists/Posts/Attachments/57/icon_shout_10_thumb_355AFAE4.gif</a><br><a href="http://www.crsw.com/mark/Lists/Posts/Attachments/57/infored_2_42B67047.gif">http://www.crsw.com/mark/Lists/Posts/Attachments/57/infored_2_42B67047.gif</a><br><a href="http://www.crsw.com/mark/Lists/Posts/Attachments/57/infored_thumb_42B67047.gif">http://www.crsw.com/mark/Lists/Posts/Attachments/57/infored_thumb_42B67047.gif</a><br><a href="http://www.crsw.com/mark/Lists/Posts/Attachments/57/infored_thumb_42B67047_2_336EEAAB.gif">http://www.crsw.com/mark/Lists/Posts/Attachments/57/infored_thumb_42B67047_2_336EEAAB.gif</a><br><a href="http://www.crsw.com/mark/Lists/Posts/Attachments/57/infored_thumb_42B67047_thumb_336EEAAB.gif">http://www.crsw.com/mark/Lists/Posts/Attachments/57/infored_thumb_42B67047_thumb_336EEAAB.gif</a><br><a href="http://www.crsw.com/mark/Lists/Posts/Attachments/57/SPDev_1DA93463.zip">http://www.crsw.com/mark/Lists/Posts/Attachments/57/SPDev_1DA93463.zip</a><br><a href="http://www.crsw.com/mark/Lists/Posts/Attachments/57/SPDev1.0.1.33695_57CA311E.zip">http://www.crsw.com/mark/Lists/Posts/Attachments/57/SPDev1.0.1.33695_57CA311E.zip</a><br><a href="http://www.crsw.com/mark/Lists/Posts/Attachments/57/SPDev1.1_6B566D0C.zip">http://www.crsw.com/mark/Lists/Posts/Attachments/57/SPDev1.1_6B566D0C.zip</a><br><a href="http://www.crsw.com/mark/Lists/Posts/Attachments/57/SPDevUtil_3989EF24.zip">http://www.crsw.com/mark/Lists/Posts/Attachments/57/SPDevUtil_3989EF24.zip</a><br><a href=""></a></div>
]]></description>
      <author>Mark Wagner</author>
      <category>SharePoint;Web Services;Tools</category>
      <pubDate>Sat, 18 Apr 2009 08:32:48 GMT</pubDate>
      <guid isPermaLink="true">http://www.crsw.com/mark/Lists/Posts/ViewPost.aspx?ID=57</guid>
    </item>
    <item>
      <title>SharePoint RunWithElevatedPrivileges Example</title>
      <link>http://www.crsw.com/mark/Lists/Posts/ViewPost.aspx?ID=43</link>
      <description><![CDATA[<div><b>Body:</b> <div class=ExternalClass1EA86F4D3A6B4612BC11ECA327319671>
<p>The following example sends an email using elevated privileges.  This will elevate the privileges to execute using the service account.</p>
<p>The SPSecurity.RunWithElevatedPrivileges method taks a delegate method as its argument and executes that code with the service account.</p>
<p><strong><font color="#0000ff" size=1>SPSecurity.RunWithElevatedPrivileges(<br>    delegate()<br>    {<br>        <font color="#339966">// Your code needing elevated permissions goes here.</font><br>    }<br>)</font></strong></p>
<div style="border-bottom:silver 1px solid;text-align:left;border-left:silver 1px solid;padding-bottom:4px;line-height:12pt;background-color:#f4f4f4;margin:20px 0px 10px;padding-left:4px;width:97.5%;padding-right:4px;font-family:'Courier New', courier, monospace;direction:ltr;font-size:8pt;overflow:auto;border-top:silver 1px solid;cursor:text;border-right:silver 1px solid;padding-top:4px" id=codeSnippetWrapper>
<div style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px" id=codeSnippet><pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px"><span style="color:#0000ff">public</span> <span style="color:#0000ff">void</span> SendEmail(Email email)</pre><pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px">{</pre><pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px">   SPSecurity.RunWithElevatedPrivileges(</pre><pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px">      <span style="color:#0000ff">delegate</span>()</pre><pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px">      {</pre><pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px">         SmtpClient mail = <span style="color:#0000ff">new</span> SmtpClient();</pre><pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px">         MailMessage message = <span style="color:#0000ff">new</span> MailMessage();</pre><pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px"> </pre><pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px">         message.From = <span style="color:#0000ff">new</span> MailAddress(<span style="color:#0000ff">this</span>.SenderAddress);</pre><pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px"> </pre><pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px">         message.To.Add(email.To);</pre><pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px">         message.IsBodyHtml = email.IsHtml;</pre><pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px"> </pre><pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px">         <span style="color:#0000ff">if</span> (!<span style="color:#0000ff">string</span>.IsNullOrEmpty(email.Cc))</pre><pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px">            message.CC.Add(email.Cc);</pre><pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px"> </pre><pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px">         <span style="color:#0000ff">if</span> (!<span style="color:#0000ff">string</span>.IsNullOrEmpty(email.Bcc))</pre><pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px">            message.Bcc.Add(email.Bcc);</pre><pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px"> </pre><pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px">         <span style="color:#0000ff">if</span> (!<span style="color:#0000ff">string</span>.IsNullOrEmpty(<span style="color:#0000ff">this</span>.ReplyToAddress))</pre><pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px">             message.ReplyTo = <span style="color:#0000ff">new</span> MailAddress(<span style="color:#0000ff">this</span>.ReplyToAddress);</pre><pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px"> </pre><pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px">         <span style="color:#0000ff">if</span> (!<span style="color:#0000ff">string</span>.IsNullOrEmpty(email.Subject))</pre><pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px">            message.Subject = email.Subject;</pre><pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px"> </pre><pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px">         <span style="color:#0000ff">if</span> (!<span style="color:#0000ff">string</span>.IsNullOrEmpty(email.Body))</pre><pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px">            message.Body = email.Body;</pre><pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px"> </pre><pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px">         mail.Host = <span style="color:#0000ff">this</span>.CentralAdminOutboundServerAddress;</pre><pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px">         mail.Send(message);</pre><pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px">      }</pre><pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px">   );</pre><pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:'Courier New', courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px">}</pre></div></div></div></div>
<div><b>Category:</b> SharePoint;Security</div>
<div><b>Published:</b> 4/11/2009 7:13 PM</div>
<div><b>Title:</b> SharePoint RunWithElevatedPrivileges Example</div>
]]></description>
      <author>Mark</author>
      <category>SharePoint;Security</category>
      <pubDate>Tue, 02 Sep 2008 17:00:40 GMT</pubDate>
      <guid isPermaLink="true">http://www.crsw.com/mark/Lists/Posts/ViewPost.aspx?ID=43</guid>
    </item>
    <item>
      <title>JavaScript ASP.NET Rater control (Rating control): Sneak Peek</title>
      <link>http://www.crsw.com/mark/Lists/Posts/ViewPost.aspx?ID=90</link>
      <description><![CDATA[<div><b>Body:</b> <div class=ExternalClassB1E428A8E73B492DA2635A2B684D3EF1>
<p class=ExternalClassCA468BEC359B45649E9D1DEFBCA8BAF9>Rater Control, Rating Control, or 5-Star Rating Control, call it what you like. 
<p class=ExternalClassCA468BEC359B45649E9D1DEFBCA8BAF9>I have created a new JavaScript ASP.NET Rater control (Rating Control)<strong>.</strong>  The entire functionality is driven by JavaScript, but I have also created an custom .NET control to facilitate easy use in an ASP.NET web application.  I intend on writing a much more detailed article, soon I hope.  For now you can see my demo page for a better look. 
<p class=ExternalClassCA468BEC359B45649E9D1DEFBCA8BAF9><strong>Technologies:</strong></p>
<div class=ExternalClassCA468BEC359B45649E9D1DEFBCA8BAF9>
<ul>
<li>JavaScript 
<li>C# 
<li>ASP.NET </li></ul></div>
<p>Here is a sneak peak at the Rater control in action: (Hint: use your mouse.) 
<p><img border=0 src="http://blogs.crsw.com/mark/Samples/CastleRaterDemo/Images/StarOff.gif"><img border=0 src="http://blogs.crsw.com/mark/Samples/CastleRaterDemo/Images/StarOff.gif"><img border=0 src="http://blogs.crsw.com/mark/Samples/CastleRaterDemo/Images/StarOff.gif"><img border=0 src="http://blogs.crsw.com/mark/Samples/CastleRaterDemo/Images/StarOff.gif"><img border=0 src="http://blogs.crsw.com/mark/Samples/CastleRaterDemo/Images/StarOff.gif">  
<p><strong>Demo Page:</strong> 
<blockquote>
<p>Demo: <a href="http://blogs.crsw.com/mark/samples/CastleRaterDemo/" target="_blank">http://blogs.crsw.com/mark/samples/CastleRaterDemo/</a> </p></blockquote>
<p><strong>Download Files:</strong></p>
<div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:c3e234b4-d4ee-4df0-b559-2c684a366981" class=wlWriterEditableSmartContent>
<p>Download: <a href="/mark/Lists/Posts/Attachments/90/Castle.Web.Controls.RaterDemo.1.1_0EB57203.zip">Rater Control 1.1</a><br>Download: <a href="/mark/Lists/Posts/Attachments/90/Castle.Web.Controls.Rater.1.1_0EB57203.zip">Rater Control 1.1 and Demo</a></p></div>
<p>Note: For anyone who would like to link to my Rater control, please link to this post and not my demo page.  Thanks.  Also, I will make the C# source code for the .NET control available soon. </p></div></div>
<div><b>Category:</b> ToDo;JavaScript;Development</div>
<div><b>Published:</b> 1/29/2005 11:44 PM</div>
<div><b>Title:</b> JavaScript ASP.NET Rater control (Rating control): Sneak Peek</div>
<div><b>Attachments:</b> <a href="http://www.crsw.com/mark/Lists/Posts/Attachments/90/Castle.Web.Controls.Rater.1.1_0EB57203.zip">http://www.crsw.com/mark/Lists/Posts/Attachments/90/Castle.Web.Controls.Rater.1.1_0EB57203.zip</a><br><a href="http://www.crsw.com/mark/Lists/Posts/Attachments/90/Castle.Web.Controls.RaterDemo.1.1_0EB57203.zip">http://www.crsw.com/mark/Lists/Posts/Attachments/90/Castle.Web.Controls.RaterDemo.1.1_0EB57203.zip</a><br><a href="http://www.crsw.com/mark/Lists/Posts/Attachments/90/tmp474_7E77C28A.zip">http://www.crsw.com/mark/Lists/Posts/Attachments/90/tmp474_7E77C28A.zip</a><br><a href=""></a></div>
]]></description>
      <author>Mark Wagner</author>
      <category>ToDo;JavaScript;Development</category>
      <pubDate>Sun, 19 Apr 2009 06:46:19 GMT</pubDate>
      <guid isPermaLink="true">http://www.crsw.com/mark/Lists/Posts/ViewPost.aspx?ID=90</guid>
    </item>
    <item>
      <title>Simple String Date Validation</title>
      <link>http://www.crsw.com/mark/Lists/Posts/ViewPost.aspx?ID=58</link>
      <description><![CDATA[<div><b>Body:</b> <div class=ExternalClass528A0D5B86BC4A37B8F5AC66DF6CEC45>
<p>Simple string date validation. 
<p><strong><font color="#ff0000">Updated:</font></strong> Use <strong>DateTime.TryParse()</strong> method instead (which was introduced after this original posting which was originally posted during the .NET version 1.x days and moved from my old blog)
<p><strong>Example:</strong>
<p><font color="#0000ff">  DateTime testDate;<br>  bool isValidString = DateTime.TryParse(myDateString, out testDate);</font>
<p><strong>Original (<font color="#ff0000">Obsolete</font>) Posting during .NET 1.0:<br></strong>I am a big fan of maintaining a library of simple and clean helper methods.  Here is a simple and clean way to verify if a string formatted date is a valid date.  This allows you to encapsulate the exception handling making it easy to use and very readable - another important coding practice. 
<p>private static bool IsDate(string sDate) <br>{<br>    DateTime dt;<br>    bool isDate = true; 
<p>    try<br>    {<br>        dt = DateTime.Parse(sDate); <br>    }<br>    catch<br>    { <br>        isDate = false;<br>    } 
<p>    return isDate;<br>}</p></div></div>
<div><b>Category:</b> Code Samples;User Tips</div>
<div><b>Published:</b> 4/6/2005 8:35 PM</div>
<div><b>Title:</b> Simple String Date Validation</div>
]]></description>
      <author>Mark Wagner</author>
      <category>Code Samples;User Tips</category>
      <pubDate>Sun, 19 Apr 2009 02:38:42 GMT</pubDate>
      <guid isPermaLink="true">http://www.crsw.com/mark/Lists/Posts/ViewPost.aspx?ID=58</guid>
    </item>
    <item>
      <title>How To: Hide/Remove the View All Site Content link in SharePoint</title>
      <link>http://www.crsw.com/mark/Lists/Posts/ViewPost.aspx?ID=36</link>
      <description><![CDATA[<div><b>Body:</b> <div class=ExternalClass9F0A76307A98413BBE79EFCB4225EB22><p style="margin:0in 0in 10pt" class=MsoNormal>by Mark Wagner<br>Article: <a href="/mark/Lists/Posts/Post.aspx?ID=36">http://www.crsw.com/mark/Lists/Posts/Post.aspx?ID=36</a></p> <p style="margin:0in 0in 10pt" class=MsoNormal><font size=3>Summary<br></font>This article covers how to hide (remove) the View All Site Content link and/or the Recycle Bin link from the quick launch navigation without having to customize the master page.<span>  </span>Additionally, I cover how I accomplished along with other options, all using the standard functionality provided in Windows SharePoint Services 3.0.</p> <p style="margin:0in 0in 10pt" class=MsoNormal><strong>Important:</strong> <span> </span>This solution is not an answer for security.<span>  </span>The user will still have access to the View All Site Content page.<span>  </span>The View All Site Content link is simply removed or hidden from the page.</p> <div class=ExternalClassE8CF14AEEA0647669C4084F25E07A9C8><font size=3>Applies To</font></div> <p style="margin:0in 0in 10pt" class=MsoNormal>- Windows SharePoint Services 3.0<br>- Microsoft Office SharePoint Server 2007</p> <p style="margin:0in 0in 10pt" class=MsoNormal><font size=3>Licensing</font></p> <ul> <li> <div style="margin:0in 0in 10pt" class=MsoNormal>There is no license required to use the Hide View All Site Content feature.</div></li> <li> <div style="margin:0in 0in 10pt" class=MsoNormal>This is available to the public (business or personal) for free.</div></li> <li> <div style="margin:0in 0in 10pt" class=MsoNormal>There is no support.</div></li> <li> <div style="margin:0in 0in 10pt" class=MsoNormal>There is no implied or explicit warranty.</div></li> <li> <div style="margin:0in 0in 10pt" class=MsoNormal>Use at your own risk.</div></li></ul> <p style="margin:0in 0in 10pt" class=MsoNormal><font size=3>Downloads</font></p> <p style="margin:0in 0in 10pt" class=MsoNormal><a href="/mark/Files/VASCSiteAction/VASCSiteAction-Binary.zip">Hide View All Site Content - Solution Package</a><br><a href="/mark/Files/VASCSiteAction/VASCSiteAction-Source.zip">Hide View All Site Content - Solution Package and Source Code</a></p> <p style="margin:0in 0in 10pt" class=MsoNormal><span><font size=3>Installation and Activation<br></font></span><span><font color="#0000ff" size=2>(Very easy, no coding required)</font></span><span><font color="#0000ff"></p></font></span> <p style="margin:0in 0in 10pt" class=MsoNormal><span></span><span>For those interested in how to install this solution, it is very easy and does not require any coding, compiling, or editing.</span></p> <p style="margin:0in 0in 10pt" class=MsoNormal><span><strong>Basic Install Steps:<br><br></strong>Note: This command must be executed on the (only one) SharePoint web server, and you must be a local administrator.</p></span> <div class=ExternalClass2BA1C681D1DD438192465895A711A005> <ol> <li> <div style="margin:0in 0in 10pt" class=MsoNormal><span>Add the solution using the STSADM command: stsadm -o addsolution -filename [path]\VASCSiteAction.wsp</span></div> <li> <div style="margin:0in 0in 10pt" class=MsoNormal><span>Deploy the solution using the STSADM command: stsadm -o deploysolution -name VASCSiteAction.wsp -allowgacdeployment -immediate -allcontenturls</span></div> <li> <div style="margin:0in 0in 10pt" class=MsoNormal><span><strong>Optional</strong> - to restart IIS: <strong>iisreset /noforce</strong> </span></div></li></ol></div> <p style="margin:0in 0in 10pt" class=MsoNormal><span><strong>Using (Activating) the new feature:</strong></span></p><span> <div class=ExternalClass1E823EE5E5CC474AA2AC69070EB33373> <ol> <li> <div style="margin:0in 0in 10pt" class=MsoNormal>Navigate to the site you want to hide the View All Site Content link.</div> <li> <div style="margin:0in 0in 10pt" class=MsoNormal>Go to the Site Settings for that site (<strong>Site Actions &gt; Site Settings</strong>).</div> <li> <div style="margin:0in 0in 10pt" class=MsoNormal>Click the <strong>Site Features</strong> (not the Site Collection Features) link under the <strong>Site Administration</strong> section. </div> <li> <div style="margin:0in 0in 10pt" class=MsoNormal>Activate the new feature named &quot;Hide the View All Site Content link&quot;. </span></div></li></ol></div> <p style="margin:0in 0in 10pt" class=MsoNormal><span>Your <strong>View All Site Content</strong> link should now be hidden and the View All Site Content link should now appear in the <strong>Site Actions</strong> menu.</span></p> <p style="margin:0in 0in 10pt" class=MsoNormal><span>For those only interested in using this solution, you do not need to read any further.  However, <span>for those who are interested in how this is accomplished, the rest of this article discusses just that.</span></span></p> <p style="margin:0in 0in 10pt" class=MsoNormal><span><span></span></span> </p> <p style="margin:0in 0in 10pt" class=MsoNormal><span><font size=5>So, How'd You Do That?</font></span><span><span><span></p> <p style="margin:0in 0in 10pt" class=MsoNormal><font size=3>Update</font></p> <p style="margin:0in 0in 10pt" class=MsoNormal>This solution can also be used to hide the Recycle Bin.  Simply add the following code to the custom core.css file in the sample solution project and your Recycle Bin will also be hidden.</p> <blockquote style="margin-right:0px" dir=ltr> <p style="margin:0in 0in 10pt" class=MsoNormal><font face=Consolas>#ctl00_PlaceHolderLeftNavBar_idNavLinkRecycleBin <br>{ <br>       Visibility:hidden; <br>}</font> </p></blockquote></span></span></span> <p style="margin:0in 0in 10pt" class=MsoNormal><font size=3>Overview<br></font>Windows SharePoint Services (WSS) 3.0 has provided a tremendous leap forward from WSS 2.0 in securing and dynamically rendering links to the user based on their access.<span>  </span>This much needed improvement is also applied to the View All Site Content link in SharePoint 3.0.<span>  </span>The View All Site Content link will only be rendered to users who have at least a minimum level of access to a given site such as adding items to any list or document library on the site.<span>  </span>For sites that allow anonymous access users to have only read access, this View All Site Content link will not appear.<span>  </span>However, there are times when a user’s level of access causes the View All Site Content link to appear, even when the site designers or administrators would rather not volunteer this link so freely to the user.<span>  </span>For this reason it is sometimes desired to have this link removed from the page for all users except maybe for site administrators or designers.<span>  </span>This is when the old adage of “Out of sight, out of mind” is an option site administrators would like to have.</p> <p style="margin:0in 0in 10pt" class=MsoNormal>The result of this article is to hide View All Site Content link from the users.  An additional View All Site Content menu item is added to the Site Action menu and is accessible only to users having the <strong>AddAndCustomizePages </strong>right.</p> <p style="margin:0in 0in 10pt" class=MsoNormal>Here is a picture of the typical View All Site Content link as it appears on a SharePoint web site and how it looks after it is hidden.</p> <p style="margin:0in 0in 10pt" class=MsoNormal> <table style="display:inline;border-collapse:collapse;font-size:1em" border=1> <tbody> <tr> <td style="vertical-align:top" class=ms-rtetablecells> <div align=center><strong>Before (Normal)</strong></div></td> <td style="vertical-align:top" class=ms-rtetablecells> <div align=center><strong>After (Hidden)</strong></div></td></tr> <tr> <td style="vertical-align:top" class=ms-rtetablecells> <div><img alt="" src="/mark/Files/VASCSiteAction/VASCNormal.jpg"> </div></td> <td style="vertical-align:top" class=ms-rtetablecells> <div> <img alt="" src="/mark/Files/VASCSiteAction/VASCHidden.jpg"></div></td></tr></tbody></table></p> <p style="margin:0in 0in 10pt" class=MsoNormal>Additionally I add a new custom menu item to the Site Action menu.  Here is the result of the new link.  This link will only appear for users having the <strong>AddAndCustomizePages </strong>right such as designers and administrators.</p> <p style="margin:0in 0in 10pt" class=MsoNormal><img alt="" src="/mark/Files/VASCSiteAction/VASCSiteActionMenu.jpg"></p> <p style="margin:0in 0in 10pt" class=MsoNormal>And finally, this functionality is wrapped up into feature allowing it to be activated or deactivated for each site as needed.  Here is the new feature that will appear in the list of Site Features for a web site.</p> <p style="margin:0in 0in 10pt" class=MsoNormal><img alt="" src="/mark/Files/VASCSiteAction/VASCFeature.jpg"></p> <p style="margin:0in 0in 10pt" class=MsoNormal>All of this is wrapped in to a single SharePoint solution package (.wsp) file and can easily be installed on a SharePoint farm by a server administrator.</p> <p style="margin:0in 0in 10pt" class=MsoNormal><strong>Note:</strong> <span> </span>From this point forward in the document, any reference to the View All Site Content link will be abbreviated to VASC.</p> <p style="margin:0in 0in 10pt" class=MsoNormal><font size=3>Consideration</font></p> <p style="margin:0in 0in 10pt" class=MsoNormal>There are a couple ways to in which to accomplish this.<span>  </span>The first and most obvious method is to modify the master page that contains this link.<span>  </span>This involves a fairly simple process of modifying the master page and removing the VASC link, then redeploying the new master page.<span>  </span>The drawback from this is that you do have to modify the master page which is sometime not desirable, plus the master page is likely to have more than one site based on it, and it may be desirable to have this View All Site Content link remain on those sites.</p> <p style="margin:0in 0in 10pt" class=MsoNormal>However, if you are willing to modify the master page, there is another posting you may find of value.  Keep in mind the security you define in the master page will be the same for all sites on your SharePoint farm.  If that is desirable, you may find this post on <a href="/mark/Lists/Posts/Post.aspx?ID=38">SPSecurityTrimmedControl: Conditionally display contents by security</a> of use.</p> <p style="margin:0in 0in 10pt" class=MsoNormal><font size=3>My Approach</font></p> <p style="margin:0in 0in 10pt" class=MsoNormal>I had a couple goals I wanted to my solution to meet.<span>  </span>They were:</p> <p style="text-indent:-0.25in;margin:0in 0in 0pt 0.5in" class=MsoListParagraphCxSpFirst><span><span>1.<span style="font:7pt 'Times New Roman'">       </span></span></span>To be able to selectively choose the sites where the VASC link is hidden.</p> <p style="text-indent:-0.25in;margin:0in 0in 0pt 0.5in" class=MsoListParagraphCxSpMiddle><span><span>2.<span style="font:7pt 'Times New Roman'">       </span></span></span>Avoid having to modify the master page if possible.</p> <p style="text-indent:-0.25in;margin:0in 0in 10pt 0.5in" class=MsoListParagraphCxSpLast><span><span>3.<span style="font:7pt 'Times New Roman'">       </span></span></span>Provide a simple way for users to hide/remove the VASC link.</p> <p style="margin:0in 0in 10pt" class=MsoNormal>After a little investigation, a few things about SharePoint (3.0/2007) surfaced that allowed me to achieve all of my goals and provide a solution that can easily be implemented.  </p> <p style="margin:0in 0in 10pt" class=MsoNormal><font size=2><strong>Hidden by Style</strong></font></p> <p style="margin:0in 0in 10pt" class=MsoNormal>The approach I have decided to use is to simply hide the VASC link using a style sheet modification.<span>  </span>The VASC link for most, if not all of the sites assigns an ID (<span style="line-height:115%;font-family:consolas;font-size:9pt">ctl00_PlaceHolderLeftNavBar_idNavLinkViewAll</span>) to the anchor tag containing the VASC link.<span>  </span>This makes it easy pretty darn easy hide this link by simply adding a bit of style code to the page.<span>  </span>In fact, just for giggles, you can copy the following style sheet code into a Content Editor Web Part.<span>  </span>This web part can even be strategically placed at the bottom of the page; optionally hide the title bar and nobody would even know it was there.<span>  </span>Here is the sample style to try it just for fun.<span>  </span>This will hide the View All Site Content link on your page.</p> <p style="margin:0in 0in 10pt 0.5in" class=MsoNormal><span style="line-height:115%;font-family:consolas;font-size:9pt">#ctl00_PlaceHolderLeftNavBar_idNavLinkViewAll<br>{<br><span>       </span>Visibility:hidden;<br>}</span></p> <p style="margin:0in 0in 10pt" class=MsoNormal>But this is not really good enough.<span>  </span>At least, not alone this isn’t.<span>  </span></p> <p style="margin:0in 0in 10pt" class=MsoNormal>I needed a way to do this for every page on a given site.<span>  </span>And copying this code to each and every page on a site is not only extremely tedious; it is almost guaranteed to be incomplete and error prone.<span>  </span>Microsoft Office SharePoint Server (MOSS) 2007 does provide an easy way to do this, but Windows SharePoint Services (WSS) 3.0 does not.<span>  </span>Using MOSS 2007, you can apply a custom style sheet to a web site and optionally apply it to every sub site.<span>  </span>For SharePoint servers where this is desired, and if you are using MOSS 2007, this will work for you.<span>  </span>Also keep in mind; you just removed the VASC link for every user – including your site designers and administrators.<span>  </span>Although this is not the worst of all problems, it is probably not the absolute desired solution either.<span>  </span></p> <p style="margin:0in 0in 10pt" class=MsoNormal>I still like the idea of using the custom style code to hide my VASC link.<span>  </span>But I also need to place a link on the page for users who will need easy access to the VASC link such as designers and administrators.<span>  </span>I know I can easily accomplish this by adding an access controlled link to the Site Actions menu, but I will come back to this in a moment.<span>  </span>I still need to address how to easily apply a customized style to every page on a given site.</p> <p style="margin:0in 0in 10pt" class=MsoNormal><font size=2><strong>CustomizeCss</strong></font></p> <p style="margin:0in 0in 10pt" class=MsoNormal>So how can I apply a custom style to every page on a given site?<span>  </span>SharePoint provides a way to do this using the SharePoint object model.<span>  W</span>ith a bit of custom C# code I use the SPWeb.CustomizeCss method to specify a custom style sheet to be used on every page of my site.</p> <p style="margin:0in 0in 10pt" class=MsoNormal>The CustomizeCss method on the SPWeb class provides way to specify the style sheet file name of an existing style sheet used by SharePoint.<span>  </span>SharePoint utilizes a number of different style sheet files.<span>  </span>The one we are interested in is the style sheet file that is applied to each and every page on the site.<span>  </span>One such style file is the core.css file, and this will do just for our needs.<span>  </span>The standard default core.css file is located in …\12\TEMPLATE\LAYOUTS\1033\STYLES.<span>  </span>This STYLES folder is a virtually mapped via the /_layouts virtual directory that is mapped to each and every site in SharePoint.<span>  </span>So, the core.css file is accessible to every site by simply using the URL of “[site-root-url]/_layouts/1033/styles/core.css”.<span>  </span>For every page that SharePoint renders, it renders a link to the core.css using this path.<span>  </span></p> <p style="margin:0in 0in 10pt" class=MsoNormal>However, for any site that has been configured to use a custom core.css style sheet via the CustomizeCss method on the SPWeb class, the URL rendered in each page references a core.css file located in a different location.<span>  </span>This is accomplished in C# by the following code where <em>web </em>is an instance of the SPWeb class for the web site of your choice.</p> <blockquote style="margin-right:0px" dir=ltr class=ExternalClassE8CF14AEEA0647669C4084F25E07A9C8> <p style="margin:0in 0in 10pt" class=MsoNormal><span style="line-height:115%;font-family:consolas;font-size:9pt">web.CustomizeCss(“core.css”);<br>web.Update();</span></p></blockquote> <p style="margin:0in 0in 10pt" class=MsoNormal>The <span style="line-height:115%;font-family:consolas;font-size:9pt">CustomizeCss(“core.css”)</span><span style="line-height:115%;font-family:consolas;font-size:9pt"> </span>statement tells SharePoint to use a custom copy of the SharePoint core.css file.<span>  </span>Once this CustomizeCss method is executed, a copy of the core.css file found in the …\12\TEMPLATE\LAYOUTS\1033\STYLES folder is copied to the folder (not a document library) named <em>_styles</em> on the applied site.<span>  </span>The resulting URL to this new core.css file can be found at <br>“[site-root-url]/_styles/core.css”.<span>  </span>Modifying this core.css file will affect only the current site.<span>  </span></p> <p style="margin:0in 0in 10pt" class=MsoNormal><span></span>Reverting this site back to using the original global (un-customized) copy of the core.css file can be accomplished just a easy using the following code.</p> <blockquote style="margin-right:0px" dir=ltr class=ExternalClassE8CF14AEEA0647669C4084F25E07A9C8> <p style="margin:0in 0in 10pt" class=MsoNormal><span style="line-height:115%;font-family:consolas;font-size:9pt">web.RevertCss(“core.css”);<br>web.Update();</span></p></blockquote> <p style="margin:0in 0in 10pt" class=MsoNormal>Executing the RevertCss method does not remove the custom core.css file on the web site’s “/_styles” folder.<span>  </span>It simply tells the site to no longer use it and to use the original core.css found in the C:\…\12\TEMPLATE\LAYOUTS\1033\STYLES folder; which is the same folder as the as the “[site-root-url]/_layouts/1033/styles” folder.</p> <p style="margin:0in 0in 10pt" class=MsoNormal>So we now know how to use the CustomizeCss and the RevertCss methods on the SPWeb class provide an easy way to point the site to a new custom style sheet file.<span>  </span>Now that we have an easy way to point our site to a custom core.css file, all we need to do is copy our custom core.css file that contains all the original core.css contents plus the extra style code to hide the VASC link and copy it into the <em>_styles</em> folder of the site.<span>  </span>All of this can easily be implemented using a SharePoint feature.<span>  </span>Using a feature provides a standard way to enable or disable functionality with a site in a safe and secure manner.<span>  </span>I won’t cover all the details on how to create the feature here, but the source code provides all the code you need.</p> <p style="margin:0in 0in 10pt" class=MsoNormal>Now that we know how to hide the View All Site Content link easily using a feature and the CustomizeCss and RevertCss methods, we need to provide an easy way to allow site designers and administrators to quickly and easily use the View All Site Content link.</p> <p style="margin:0in 0in 10pt" class=MsoNormal><font size=2><strong>Site Action Link</strong></font></p> <p style="margin:0in 0in 10pt" class=MsoNormal>To provide web managers such as designers and administrators with a convenient link equal to the View All Site Content link, we will add a new custom action menu item.<span>  </span>I won’t go into the details of the code and how to create the feature here, but I will briefly cover the expected functionality.  Again, the source code is available for those interested in the technical details.</p> <p style="margin:0in 0in 10pt" class=MsoNormal>The Site Action is usually located in the upper right corner of the web site and contains links used by site administrators such as the Site Settings link.<span>  </span>The nice thing about the Site Actions menu is that it is collapse and consumes a minimal amount of screen real estate.<span>  </span>So, adding an additional menu option to the Site Actions menu will not only be convenient for site administrators, it’s pretty easy to implement in a SharePoint feature.<span>  </span>This new View All Site Content link on the Site Action can be secured in a manner that best suits your needs.<span>  </span>In the solution sample I provide, this new View All Site Content link on the Site Actions menu is only visible to users who have the “<strong>AddAndCustomizePages</strong>” right which allows designers and administrators to see it, but is not visible to typical users of a site.</p> <p style="margin:0in 0in 10pt" class=MsoNormal>There are plenty of examples on how to add a custom item to the Site Action menu so I will not cover that in any detail here, but the solution sample I provide does include all the code – and the nice thing is, it isn’t much code.</p> <p style="margin:0in 0in 10pt" class=MsoNormal><span><font size=3>Installation and Activation</font></span></p> <p style="margin:0in 0in 10pt" class=MsoNormal><span><strong>Basic Install Steps:</strong><br>1 - Add the solution using the STSADM command: stsadm -o addsolution -filename [path]\VASCSiteAction.wsp <br>2 - Deploy the solution using the STSADM command: stsadm -o deploysolution -name VASCSiteAction,wsp -allowgacdeployment -immediate -allcontenturls<br>3 - Optional - to restart IIS: iisreset /noforce </span></p> <p style="margin:0in 0in 10pt" class=MsoNormal><span><strong>Activating the new feature:</strong><br>1 - Navigate to the site you want to hide the View All Site Content link. <br>2 - Go to the Site Settings for that site (Site Actions &gt; Site Settings). <br>3 - Click the Site Features (not the Site Collection Features) link under the Site Administration section. <br>4 - Activate the new feature named &quot;Hide the View All Site Content link&quot;. </span></p> <p style="margin:0in 0in 10pt" class=MsoNormal><span>Your View All Site Content link should now be hidden and the View All Site Content link should now appear in the Site Actions menu.</span></p> <p style="margin:0in 0in 10pt" class=MsoNormal><font size=3>Conclusion</font></p> <p style="margin:0in 0in 10pt" class=MsoNormal>The result is a single feature that a site administrator can activate and deactivate on any web site to hide and show the standard View All Site Content link in the quick launch navigation.<span>  </span>Additionally, it adds a useful new View All Site Content to the Site Actions menu that is visible only to users having the <strong>AddAndCustomizePages </strong>right on that site.</p> <p style="margin:0in 0in 10pt" class=MsoNormal>References:</p> <div class=ExternalClassE8CF14AEEA0647669C4084F25E07A9C8> <ul> <li> <div style="margin:0in 0in 10pt" class=MsoNormal><strong>List and Site Permissions</strong><br><a href="http://office.microsoft.com/en-us/sharepointtechnology/HA101001491033.aspx#2">http://office.microsoft.com/en-us/sharepointtechnology/HA101001491033.aspx#2</a></div></li></ul></div></div></div>
<div><b>Published:</b> 11/1/2007 7:46 AM</div>
<div><b>Title:</b> How To: Hide/Remove the View All Site Content link in SharePoint</div>
]]></description>
      <author>Mark</author>
      <pubDate>Thu, 01 Nov 2007 13:42:08 GMT</pubDate>
      <guid isPermaLink="true">http://www.crsw.com/mark/Lists/Posts/ViewPost.aspx?ID=36</guid>
    </item>
    <item>
      <title>JavaScript Object Browser Sample</title>
      <link>http://www.crsw.com/mark/Lists/Posts/ViewPost.aspx?ID=18</link>
      <description><![CDATA[<div><b>Body:</b> <div class=ExternalClass0978E34601254584952104838FEE20A8><div class=ExternalClassD4168B7E62724CC0940CCB6DE9B9639F> <p>Note: This is a repost from my old blog:<br><a href="http://blogs.crsw.com/mark/articles/652.aspx">http://blogs.crsw.com/mark/articles/652.aspx</a></p> <p>Below is a small JavaScript application that allows you to browse through various objects on the DOM as well as JavaScript variables.  I wrote this in an attempt to better understand the differences between various web browsers, specifically Internet Explorer, Netscape, and Firefox.</p> <p><strong>Downloads:</strong></p> <p>- You can <a href="/mark/Files/JSObjectBrowserSample.zip"><strong>download</strong></a> my sample.</p> <p><strong>Demo:</strong></p> <p>- <a href="/mark/Samples/JavaScript%20Object%20Browser/JavaScriptObjectBrowserSample.htm">Click here to view the demo page.</a></p> <p>You will find a top level <strong>window</strong> object with all its immediate children located blow.  Links are available on child objects where appropriate.  This is 100% driven by looking at each object property generically, meaning, nothing is hard-coded.  This allows any of your custom JavaScript variables (<strong>in a Netscape browser its even better</strong>) to be viewed.</p> <p>Areas I found of particular interest:</p> <ul> <li>the <em><strong>windows.document</strong></em> node of the tree. <br> <li>functions will appear with a <em>function</em> link.  Clicking on this link will reveal the JavaScript for that function.  My demo below will show the javascript by drilling into (clicking) on the <font color="#003399">window</font>.<font color="#003399">document</font>.<font color="#003399">onreadystatechange</font> node.<br> <li>the <em>window.top.document.scripts</em> link will list all the script tags, and the associated script if the actual script is embedded within the document.</li></ul> <p>I hope to improve and use this when debugging scripts.  Again, by adding two small links to javascript (via <em>script</em> tags) this becomes available on any page I like.</p> <div><code><strong><font color="#0000ff">&lt;SCRIPT language=javascript src=&quot;http://www.wagnerlive.com/Mark/Files/castleJSHelper.js&quot;&gt;&lt;/SCRIPT&gt; &lt;SCRIPT language=javascript src=&quot;http://www.wagnerlive.com/Mark/Files/castleJSObjectBrowser.js&quot;&gt;&lt;/SCRIPT&gt;</font></strong></code></div> <div><code><strong><font color="#0000ff"></font></strong></code> </div> <p>These javascript files are available for download (above) so that you can reference these files on your own server.</p> <p>Below is a link to the demo, <strong>but FIRST</strong>, the remember to look at the root <strong>window</strong> node in the tree.  This will expand to show the context of the child items in the tree view.  For example, if you click on the <strong>document</strong> node, the root node will change from <strong>window</strong> to <strong>window.document</strong>, and the child nodes will change to reflect the child objects for the document node.  Additionally, the window portion of the root node can be clicked to return to the root window context.</p></div></div></div>
<div><b>Category:</b> JavaScript;Code Samples</div>
<div><b>Published:</b> 12/22/2004 1:26 PM</div>
<div><b>Title:</b> JavaScript Object Browser Sample</div>
]]></description>
      <author>Mark</author>
      <category>JavaScript;Code Samples</category>
      <pubDate>Thu, 26 Apr 2007 19:48:59 GMT</pubDate>
      <guid isPermaLink="true">http://www.crsw.com/mark/Lists/Posts/ViewPost.aspx?ID=18</guid>
    </item>
    <item>
      <title>Building a Better Busy Box - Ver 1.2</title>
      <link>http://www.crsw.com/mark/Lists/Posts/ViewPost.aspx?ID=16</link>
      <description><![CDATA[<div><b>Body:</b> <div class=ExternalClass4ED7B06EEE7140C494D20ACE91DD8F40><div class=ExternalClass3DF9B5B3476E484BBE3725217801B965> <div> <p class=postText><font size=5><font size=2>Building a Better Busy Box - Ver 1.2 (Processing… Please Wait)</font><br></font><a title="" target="_blank"><a title="" target="_blank"><font color="#000080"></a><br><a title="" target="_blank">Mark Wagner</a></font></a></a><br>Castle Rock Software, LLC<br><a href="/mark"><font color="#000080">http://www.crsw.com/mark</font></a> </p> <p class=postText>February 16, 2005</p> <p class=postText><strong>Updates</strong></p> <div class=postText> <ul> <li>February 16, 2005 - Rewrite to use an IFRAME instead of a DIV tag.  <li>January 7, 2005 - Fixed z-Index attribute.  <li>November 13, 2004 - Original article</li></ul></div> <p><strong>Summary:</strong> We often need to provide a user message informing the user that their request is “processing”.  Like the hour-glass mouse pointer lets the Windows user know the system is busy processing their last request, I have a simple, clean, and effect solution to providing this on web pages.</p> <p><strong>BusyBox Demo</strong> </p> <ul> <li></strong><a href="http://blogs.crsw.com/mark/samples/BusyBoxDemo/Default.aspx" target="_blank"><font color="#000080">http://blogs.crsw.com/mark/samples/BusyBoxDemo/Default.aspx</font></a></li></ul> <p><strong>Download Files</strong></p> <div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:435f2ca4-458f-451d-9161-075aac74a547" class=wlWriterEditableSmartContent><p>Download: <a href="/mark/Lists/Posts/Attachments/16/BusyBox1.2Demo_1F02AEA4.zip">BusyBox 1.2 Source and Demo</a></p></div> <p><strong>Technologies employed</strong> </p> <ul> <li>JavaScript  <li>HTML (ASP.NET)</li></ul> <p><strong>Supported browsers</strong>  </p> <ul> <li>Internet Explorer 6  <li>Netscape Navigator 7.1, 7.2  <li>Firefox 1.0  <li>No other browsers have been tested </li></ul> <p><font size=5>Introduction</font> <br>Anyone who has used the Internet for more than a few hours has encountered times when the “Internet” is being slow.  I use the term “Internet” in jest here since it is often the term used when websites are not responding as quickly as we would like.  As most of us know, the problem is more often caused by an over-worked website, one that is unable to handle its current workload.  This article does not address any performance issues as that is a much larger topic for another time.  However, for those well designed and well cared-for websites there are very acceptable times when displaying a “processing” message to the user is very helpful and very appropriate. </p> <p>I have certainly experienced times; as I am sure you have, where after clicking a submit or search button I began to wonder if the web server was going to process my request successfully.  Why shouldn’t it.  I didn’t expect it to take more than a second or two.  Performing functions like a search, report generation, or the processing of a large order, can often take more time than we would like.  These predictably slow responding places in an application are ideal candidates for user feedback in the form of a processing message.  As long as your website is not normally slow, your users will appreciate being notified of potentially long running processes. </p> <p>There are a number of different approaches to accomplishing this.  One of the more common methods is to navigate to an intermediate page where an animated image and/or message are presented to the user.  The intermediate page then immediately initiates the process of navigating to the long-processing page.  This allows the intermediate “please wait” page to be displayed to the user while the long-processing target page is crunching away.  When the target page completes its long process it then begins rendering to the user’s browser, thus replacing the “please wait” message.  While this technique works well when navigating from page A to page B, it does not work well when a post-back (from page A to page A) is needed.  Additionally, having the benefits of things like ViewState become discarded. </p> <p><font size=5>My Approach</font> <br>The approach I am about to cover functions just as well during a post-back as it does when navigating from page X to page Y.  Moreover, there is no need (or desire) to have an intermediate processing page.  If you are using a custom base page for your application; (i.e. a MasterPage), it becomes even easier to user.  I have added this to my personal CastlePage class making it very easy to use at anytime. </p> <p>My approach is to pre-load my busy box message in a hidden IFRAME <em></em>tag on any page that will navigate (or post-back) to a potentially long running process. After all, my busy box message has a pretty small code footprint. The page will begin it’s unload process whenever the browser posts to a new page or performs a post-back. By placing JavaScript code in the <em>onbeforeunload</em> event of the <em>body</em> tag I can instantly reveal the busy box message to the user. Since this is part of the original page it will display immediately and remain visible until the new page completes its processing and begins to render in the user's browser. Best of all, this works great with post-backs too.</p> <p>My approach is: </p> <ul> <li>Render the busy box message in a hidden IFRAME tag wherever we have a page that may post to a long processing page.  <li>Display the busy box message before leaving this page (or posting back to the same page) by using the <em>onbeforeunload</em> event on the html <em>body</em> tag.  <strong>Note:</strong> An alternative method for browsers that do not support the <em>onbeforeunload</em> event is also discussed later.  <li>Use JavaScript to perform a simple animation to the client. </li></ul> <p><strong>Continuing to Learn </strong><br>My first pass at this was to use an animated GIF image to fulfill my animated desires.  Putting together a quick prototype didn’t take long, but I immediately realized, remembered, discovered (pick one that best flatters me) that the .gif images stop animating once a post-back or navigation to another page is initiated.  This is consistent for all my test browsers (IE, NS, Firefox).  Although this realization didn’t bring my approach to a crashing halt, the thought of having only a static image was less than exciting.  Fortunately, I noticed that my image buttons still alternated to the hover image when I moved the mouse over them.  That’s when I realized that although GIF image may stop animating; JavaScript is still working hard – in all my test browsers.  With this said, I decided to animate the images using JavaScript.  This added a little more work, but as you will see, not much more work. </p> <p><font size=5>JavaScript Animation</font> <br>First and foremost, I used my new copy of JavaScript - The Definitive Guide by David Flanagan as my sole JavaScript resource.  This now famous “Rhino” book continues to be well received by developers.  I have to agree as I found this book to be very well written and packed with excellent information. </p> <p>An animated .GIF image is nothing more than a series of images that are displayed in rapid succession.  Since the web browsers won’t do this for me, I will do it myself using JavaScript. </p> <p>My animation will require a number of images that will be displayed in rapid succession.  To allow the animated image to be developer-defined (customizable), I will need to know the number of images and the image names.  To help manage this animation and to keep it clean, the image names must have a predicable sequence number in a predictable position.  To accomplish this I have two image name requirements. </p> <ul dir=ltr> <li>The names may be anything the developer wants as long as the image name prefix and suffix are consistent for every image.  <li>The first image sequence number will be zero. </li></ul> <p dir=ltr>Here is the required image name format: </p> <ul> <li> <div>PrefixName + SequenceNumber + SuffixName </div></li></ul> <p>Here are valid image name examples: </p> <ul> <li>BusyImage0.gif,  BusyImage1.gif,  BusyImage2.gif,  BusyImage3.gif, …, BusyImage6.gif  <li>Images/BusyImage0.gif,  Images/BusyImage1.gif,  Images/BusyImage2.gif  <li>Animate0Image.gif,  Animate1Image.gif,  Animate2Image.gif, …, Animate8Image.gif </li></ul> <p>The three image name properties used to define the images are <em>ImageNamePrefix</em>, <em>ImageNameSuffix</em>, and <em>ImageCount</em>; each of which are described below. </p> <p>Before I dive into the details of my JavaScript, I thought it would be helpful to provide a quick overview of what my JavaScript BusyBox object interface will look like.  Here is a quick summary of the interface. </p> <p><font size=4>Constructor</font> </p> <p>BusyBox(id, varName, imageCount, imageNamePrefix, imageNameSuffix, imageDelay, width, height, url)</p> <p>The parameters provided in this constructor are described in the properties section. </p> <p><font size=4>Properties</font> </p> <p>id </p> <ul> <li>Defines the id of the IFrame tag to use with this instance of the BusyBox object.</li></ul> <p>VarName </p> <ul> <li>This string value defines the name of the JavaScript variable containing the instance of this BusyBox object on the client’s machine.  This is needed so that we can use the setTimeout() statement, discussed later. </li></ul> <p>ImageCount </p> <ul> <li>This integer value defines the number of images to use in the animation. </li></ul> <p>ImageNamePrefix </p> <ul> <li>This string value defines the name prefix of the images that are used in the animation.  <li>Example: “myBusyBoxImage_” or “images/myBusyBoxImage_”. </li></ul> <p>ImageNameSuffix </p> <ul> <li>This string value defines the extension of the images that are used in the animation.  <li>Example: “.gif” or “.jpg” or &quot;_ani.gif&quot;. </li></ul> <p>ImageDelay </p> <ul> <li>This integer value defines the length of time in milliseconds to display each image. </li></ul> <p>Width </p> <ul> <li>This defines the width (in pixels) of the busy box IFRAME tag.  <li>Netscape and Firefix require this value to be defined.  For Internet Explorer users, the width is automatically calculated using the BusyBoxDiv tag attributes. </li></ul> <p>Height </p> <ul> <li>This defines the height (in pixels) of the busy box IFRAME tag.  <li>Netscape and Firefix require this value to be defined.  For Internet Explorer users, the width is automatically calculated using the BusyBoxDiv tag attributes.</li></ul> <p>BusyBoxUrl</p> <ul> <li>Optional  <li>Defines the url to the page containing the custom busy box layout.  <li>If this value is omitted or null during the instantiation call, the internally defined layout is used.  The <em>RenderContent()</em> method is used to render the internal default layout.</li></ul> <p>Images </p> <ul> <li>This array contains a reference to every image in the animation.  This property is populated during the constructor via the CacheImages() method.  <li>This property should be treated as read-only. </li></ul> <p>CurrentImageIndex </p> <ul> <li>This value is automatically calculated and incremented during the animation process.  <li>This value should be treated as read-only. </li></ul> <p>Enabled </p> <ul> <li>Get or set this Boolean value to enable or disable (a false value) the BusyBox using JavaScript.  <li>This allows client-side JavaScript to conditionally enable or disable the BusyBox, should that become necessary.  A false value will prevent the busy box from being displayed when the <em>Show</em> method is called.  <li>The default value is true. </li></ul> <p>IsAnimating</p> <ul> <li>Returns a boolean value representing the state of the animation.  <li>This should be treated as read-only.</li></ul> <p>IsVisible</p> <ul> <li>Returns a boolean value representing the visibility state for the busy box.  <li>This should be treated as read-only.</li></ul> <p><font size=4>Methods</font> </p> <p>Show() </p> <ul> <li>Displays the busy box by changing its visibility from hidden to visible.  <li>Centers the busy box over the current window scroll position.  <li>The BusyBox message will be displayed only if the Enabled property is true.  If the Enabled property is false, this Show method will do nothing. </li></ul> <p>Hide() </p> <ul> <li>Hides the busy box by changing its visibility to hidden.  <li>Provides a method to hide the BusyBox using JavaScript should it be necessary.  This may be called anytime using client-side JavaScript.  <li><strong>Note:</strong> This was fixed from the previous version. </li></ul> <p>Animate() </p> <ul> <li>Performs the animation process.  <li>This method should be treated as private.  There is no need to call this method directly.  The StartAnimate method should be called to start the animation process. </li></ul> <p>StartAnimation() </p> <ul> <li>Starts the animation process.  <li>Provides a method to start the animation process using JavaScript should it be necessary.  This may be called anytime using client-side JavaScript.</li></ul> <p>StopAnimate() </p> <ul> <li>Stops the animation process.  <li>Provides a method to stop the animation using JavaScript should it be necessary.  This may be called anytime using client-side JavaScript. </li></ul> <p>CacheImages() </p> <ul> <li>Pre-loads the images from the server to improve the animation performance.  There is no need to directly call this method since it is called by the constructor.  <li>This should be treated as private.  There should be no need to call this method.</li></ul> <p>GetIFrameDocument() </p> <ul> <li>Returns a reference to the document object in the IFrame using the appropriate method depending on the browser version.  <li>This should be treated as private.  There should be no need to call this method.</li></ul> <p>LoadUrl()</p> <ul> <li>Changing the src attribute for an IFrame tag causes each new page to be added to the browsers history object. This causes undesired results for the user when they click the back button. Instead, we can use the <em>document.location.replace()</em> method to correctly load our busy box page into our IFrame.  <li>Arguments: url - url to the busy box page. BusyBox.prototype.LoadUrl = function(url)  <li>This should be treated as private.  There should be no need to call this method.</li></ul> <p>RenderContent()</p> <ul> <li>This method is used when the default busy box layout is used; not a custom layout. This method is called when the url argument for the constructor is null.  <li>This should be treated as private.  There should be no need to call this method.</li></ul> <p>Resize()</p> <ul> <li>Resizes the busy box IFrame by setting its width and height attributes to the size of its contents for Internet Explorer browers.  For Netscape and Firefox, the width and height defined in the constructor are used to resize the IFrame.  <li>This should be treated as private.  There should be no need to call this method.  <li><strong>Help:</strong> If anyone knows how to reliably determine ths size of the contents for Netscape and Firefox, please let me know.  Thanks.</li></ul> <p>Center()</p> <ul> <li>Centers the busy box IFrame on the page regardless of the browsers scroll position. This ensures the busy box is presented to the user in a visible location in the window.  <li>This should be treated as private.  There should be no need to call this method.</li></ul> <p><font size=5>JavaScript Code</font> </p> <p>The JavaScript needed to perform the animation is pretty simple. The JavaScript found in the BusyBox.js file is static and used as is by placing a reference to it via the standard script tag. There is only one line of custom JavaScript code needed for any page, and that is to create an instance of the BusyBox object. Here is a sample of that code where I have chosen to use the variable name of “busyBox”.</p> <p>var busyBox = new BusyBox(&quot;BusyBoxIFrame&quot;, &quot;busyBox&quot;, 4, &quot;images/gears_ani_&quot;, &quot;.gif&quot;, 125, 147, 206)</p> <p>You will find the above line of code shown again in the HTML code below. I will not cover each line of JavaScript code; however, there are a couple key items worth pointing out. The first is the BusyBox constructor. The constructor executes the CacheImages method so that all the images used in the animation will be “pre-loaded” and ready for immediate use. The process used to cache the images simply forces the browser to retrieve the images during the initial page load. The images are not actually stored in the Images array. Additionally, the Images array provides an easy reference to each image used in the animation. </p> <p>The <em>Animate</em> method sets the current image to display and then calls the JavaScript function <em>setTimeout()</em>. The set <em>setTimeout()</em> function executes the next statement in x number of milliseconds. As you can see, <em>setTimeout()</em> continues to call itself to display the next sequential image until the page is unloaded or until the animation is stopped using the <em>StopAnimate()</em> method. This is 100% of the animation process. Again, pretty simple (and straight out of the Rhino book).</p> <p>The <em>Show</em> method has only a few small tasks, which are 1) to determine the size of the developer-defined busy box (for IE browsers).  2) Position the busy box in the center of the users browser regardless of the scroll position.  3) To begin the animation process.</p> <p>The following code can be found in the CastleBusyBox.js file.  Note: The actual CastleBusyBox.js file contains a brief summary of comments for each method, and has a few more helper methods.</p> <div style="width:100%;overflow:scroll"><pre style="color:#000000"><span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">1</span>function BusyBox(id, varName, imageCount, imageNamePrefix, imageNameSuffix, imageDelay, width, height, url)
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">2</span>{
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">3</span>   <span style="color:#008200">// Initialize object</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">4</span>   <span style="color:#0000ff">this</span>.id = id;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">5</span>   <span style="color:#0000ff">this</span>.ImageCount = imageCount;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">6</span>   <span style="color:#0000ff">this</span>.CurrentImageIndex = 0;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">7</span>   <span style="color:#0000ff">this</span>.ImageWidth = 0;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">8</span>   <span style="color:#0000ff">this</span>.ImageHeight = 0;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">9</span>   <span style="color:#0000ff">this</span>.ImageNamePrefix = imageNamePrefix;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">10</span>   <span style="color:#0000ff">this</span>.ImageNameSuffix = imageNameSuffix;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">11</span>   <span style="color:#0000ff">this</span>.ImageDelay = imageDelay;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">12</span>   <span style="color:#0000ff">this</span>.DivID = <span style="color:#848284">&quot;BusyBoxDiv&quot;</span>;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">13</span>   <span style="color:#0000ff">this</span>.ImgID = <span style="color:#848284">&quot;BusyBoxImg&quot;</span>;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">14</span>   <span style="color:#0000ff">this</span>.Enabled = <span style="color:#0000ff">true</span>;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">15</span>   <span style="color:#0000ff">this</span>.Width = width;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">16</span>   <span style="color:#0000ff">this</span>.Height = height;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">17</span>   
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">18</span>   <span style="color:#008200">// Retain the name of the instantiated object variable so that we can animate </span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">19</span>   <span style="color:#008200">// using the setTimeout statement</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">20</span>   <span style="color:#0000ff">this</span>.VarName = varName;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">21</span>   
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">22</span>   <span style="color:#008200">// Allows us to stop the animation with clearTimeout(), should we ever want to</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">23</span>   <span style="color:#0000ff">this</span>.timeout_id = <span style="color:#0000ff">null</span>;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">24</span>   
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">25</span>   <span style="color:#008200">// Cache (pre-load) images</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">26</span>   <span style="color:#0000ff">this</span>.CacheImages();
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">27</span>   
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">28</span>   <span style="color:#008200">// Url to the page containing the busy box.</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">29</span>   <span style="color:#0000ff">this</span>.BusyBoxUrl = url;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">30</span>   
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">31</span>   <span style="color:#008200">// Get reference to the IFrame object</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">32</span>   <span style="color:#0000ff">this</span>.IFrame = document.getElementById(<span style="color:#0000ff">this</span>.id);
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">33</span>   
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">34</span>   <span style="color:#008200">// Hide the busy box</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">35</span>   <span style="color:#0000ff">this</span>.Hide();
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">36</span>   
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">37</span>   <span style="color:#0000ff">if</span>( <span style="color:#0000ff">this</span>.BusyBoxUrl )
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">38</span>      <span style="color:#008200">// Load the busy box contents using a custom layout page.</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">39</span>      <span style="color:#0000ff">this</span>.LoadUrl(<span style="color:#0000ff">this</span>.BusyBoxUrl);
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">40</span>   <span style="color:#0000ff">else</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">41</span>      <span style="color:#008200">// Load the busy box contents using the internally defined layout.</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">42</span>      <span style="color:#0000ff">this</span>.RenderContent();
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">43</span>   
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">44</span>   <span style="color:#008200">// If this browser does not support IFRAME tags then disable this control.  The</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">45</span>   <span style="color:#008200">// next version will implement the use of a DIV instead of the IFRAME tag; </span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">46</span>   <span style="color:#008200">// even though there are a couple minor issues with using DIV tags.</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">47</span>   <span style="color:#0000ff">if</span>( !frames[<span style="color:#0000ff">this</span>.id] )
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">48</span>      <span style="color:#0000ff">this</span>.Enabled = <span style="color:#0000ff">false</span>;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">49</span>}
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">50</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">51</span>BusyBox.prototype.GetIFrameDocument = function()
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">52</span>{
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">53</span>   var doc;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">54</span>   
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">55</span>   <span style="color:#0000ff">if</span>( <span style="color:#0000ff">this</span>.IFrame.contentDocument )
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">56</span>      <span style="color:#008200">// For NS6</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">57</span>      doc = <span style="color:#0000ff">this</span>.IFrame.contentDocument; 
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">58</span>   <span style="color:#0000ff">else</span> <span style="color:#0000ff">if</span>( <span style="color:#0000ff">this</span>.IFrame.contentWindow ) 
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">59</span>      <span style="color:#008200">// For IE5.5 and IE6</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">60</span>      doc = <span style="color:#0000ff">this</span>.IFrame.contentWindow.document;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">61</span>   <span style="color:#0000ff">else</span> <span style="color:#0000ff">if</span>( <span style="color:#0000ff">this</span>.IFrame.document )
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">62</span>      <span style="color:#008200">// For IE5</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">63</span>      doc = <span style="color:#0000ff">this</span>.IFrame.document;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">64</span>   <span style="color:#0000ff">else</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">65</span><span style="color:#008200">// TODO: Confirm this should be the default</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">66</span>      doc = <span style="color:#0000ff">this</span>.IFrame.document;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">67</span>   
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">68</span>   <span style="color:#0000ff">return</span> doc;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">69</span>}
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">70</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">71</span>BusyBox.prototype.LoadUrl = function(url)
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">72</span>{
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">73</span>   <span style="color:#008200">// Get a reference to the document object in the IFrame</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">74</span>   var IFrameDoc = <span style="color:#0000ff">this</span>.GetIFrameDocument();
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">75</span>   
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">76</span>   <span style="color:#008200">// Load the url using the replace method.  This will prevent the browsers </span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">77</span>   <span style="color:#008200">// history object from being updated with the new busybox url; thus allowing </span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">78</span>   <span style="color:#008200">// the back button to function as desired for the user.</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">79</span>   IFrameDoc.location.replace(url);
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">80</span>}
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">81</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">82</span>BusyBox.prototype.RenderContent = function()
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">83</span>{
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">84</span>   <span style="color:#008200">// Get the IFrame document object</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">85</span>   var doc = <span style="color:#0000ff">this</span>.GetIFrameDocument();
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">86</span>   
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">87</span>   var wh = <span style="color:#848284">&quot;width:&quot;</span> + <span style="color:#0000ff">this</span>.Width + <span style="color:#848284">&quot;; height:&quot;</span> + <span style="color:#0000ff">this</span>.Height;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">88</span>   var style = <span style="color:#848284">&quot; style='BORDER: navy 3px solid; POSITION: absolute; &quot;</span> + wh + <span style="color:#848284">&quot;'&quot;</span>;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">89</span>   
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">90</span>   doc.open();
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">91</span>   doc.writeln(<span style="color:#848284">&quot;&lt;body ondragstart='return false;' style='Margin: 0px; Background-Color: white'&gt;&quot;</span>);
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">92</span>   doc.writeln(<span style="color:#848284">&quot;   &lt;div id='&quot;</span> + <span style="color:#0000ff">this</span>.DivID + <span style="color:#848284">&quot;' align=center &quot;</span> + style + <span style="color:#848284">&quot;&gt;&quot;</span>);
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">93</span>   doc.writeln(<span style="color:#848284">&quot;      &lt;img id='&quot;</span> + <span style="color:#0000ff">this</span>.ImgID + <span style="color:#848284">&quot;' src=''&gt;&quot;</span>);
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">94</span>   doc.writeln(<span style="color:#848284">&quot;      &lt;br&gt;&lt;h3&gt;Processing&lt;/h3&gt;&quot;</span>);
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">95</span>   doc.writeln(<span style="color:#848284">&quot;   &lt;/div&gt;&quot;</span>);
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">96</span>   doc.writeln(<span style="color:#848284">&quot;&lt;/body&gt;&quot;</span>);
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">97</span>   doc.close();
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">98</span>}
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">99</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">100</span>BusyBox.prototype.Resize = function()
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">101</span>{
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">102</span>   <span style="color:#008200">// Resize the busy box IFrame.</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">103</span>   <span style="color:#0000ff">if</span>( BusyBox.IsBrowserIE() )
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">104</span>   {
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">105</span>      <span style="color:#008200">// Set the width by looking at its contents</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">106</span>      var div = frames[<span style="color:#0000ff">this</span>.id].document.getElementById(<span style="color:#0000ff">this</span>.DivID);
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">107</span>      <span style="color:#0000ff">this</span>.IFrame.style.width = div.offsetWidth;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">108</span>      <span style="color:#0000ff">this</span>.IFrame.style.height = div.offsetHeight;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">109</span>   }
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">110</span>   <span style="color:#0000ff">else</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">111</span>   {
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">112</span>      <span style="color:#008200">// Set the width to the value specified.</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">113</span>      <span style="color:#0000ff">this</span>.IFrame.style.width = <span style="color:#0000ff">this</span>.Width;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">114</span>      <span style="color:#0000ff">this</span>.IFrame.style.height = <span style="color:#0000ff">this</span>.Height;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">115</span>   }
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">116</span>}
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">117</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">118</span>BusyBox.prototype.Center = function()
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">119</span>{
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">120</span>   <span style="color:#0000ff">if</span>( !<span style="color:#0000ff">this</span>.IFrame )
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">121</span>      <span style="color:#0000ff">return</span>;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">122</span>   
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">123</span>   <span style="color:#008200">// Center the BusyBox in the window regardless of the scroll positions</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">124</span>   var objLeft = (document.body.clientWidth - <span style="color:#0000ff">this</span>.IFrame.offsetWidth) / 2;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">125</span>   var objTop = (document.body.clientHeight - <span style="color:#0000ff">this</span>.IFrame.offsetHeight) / 2;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">126</span>   objLeft = objLeft + document.body.scrollLeft;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">127</span>   objTop = objTop + document.body.scrollTop;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">128</span>   
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">129</span>   <span style="color:#008200">// Position object</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">130</span>   <span style="color:#0000ff">this</span>.IFrame.style.position = <span style="color:#848284">&quot;absolute&quot;</span>;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">131</span>   <span style="color:#0000ff">this</span>.IFrame.style.top = objTop;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">132</span>   <span style="color:#0000ff">this</span>.IFrame.style.left = objLeft;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">133</span>}
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">134</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">135</span>BusyBox.prototype.CacheImages = function()
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">136</span>{
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">137</span>   <span style="color:#008200">// Instantiate the array to store the image references</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">138</span>   <span style="color:#0000ff">this</span>.Images = <span style="color:#0000ff">new</span> Array(<span style="color:#0000ff">this</span>.ImageCount);
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">139</span>   
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">140</span>   <span style="color:#008200">// Load all the images to cache into the aniframes array</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">141</span>   <span style="color:#0000ff">for</span>(var i = 0; i &lt; <span style="color:#0000ff">this</span>.ImageCount; i++)
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">142</span>   {
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">143</span>      <span style="color:#0000ff">this</span>.Images[i] = <span style="color:#0000ff">new</span> Image();
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">144</span>      <span style="color:#0000ff">this</span>.Images[i].src = <span style="color:#0000ff">this</span>.ImageNamePrefix + i + <span style="color:#0000ff">this</span>.ImageNameSuffix;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">145</span>   }
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">146</span>}
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">147</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">148</span>BusyBox.prototype.IsAnimating = function()
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">149</span>{
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">150</span>   <span style="color:#0000ff">if</span>( <span style="color:#0000ff">this</span>.timeout_id == <span style="color:#0000ff">null</span>)
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">151</span>      <span style="color:#0000ff">return</span> <span style="color:#0000ff">false</span>;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">152</span>   <span style="color:#0000ff">else</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">153</span>      <span style="color:#0000ff">return</span> <span style="color:#0000ff">true</span>;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">154</span>}
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">155</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">156</span>BusyBox.prototype.IsVisible = function()
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">157</span>{
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">158</span>   var ifrm = document.getElementById(<span style="color:#0000ff">this</span>.id);
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">159</span>   
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">160</span>   <span style="color:#0000ff">if</span>( ifrm.style.visibility == <span style="color:#848284">&quot;visible&quot;</span> &amp;&amp; ifrm.style.width &gt; 0 )
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">161</span>      <span style="color:#0000ff">return</span> <span style="color:#0000ff">true</span>;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">162</span>   <span style="color:#0000ff">else</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">163</span>      <span style="color:#0000ff">return</span> <span style="color:#0000ff">false</span>;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">164</span>}
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">165</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">166</span>BusyBox.prototype.Animate = function()
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">167</span>{
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">168</span>   <span style="color:#008200">// Assign the current image sequence to display</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">169</span>   <span style="color:#0000ff">if</span>( frames[<span style="color:#0000ff">this</span>.id] )
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">170</span>      <span style="color:#008200">// browser supports frames</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">171</span>      frames[<span style="color:#0000ff">this</span>.id].document.getElementById(<span style="color:#0000ff">this</span>.ImgID).src = <span style="color:#0000ff">this</span>.Images[<span style="color:#0000ff">this</span>.CurrentImageIndex].src;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">172</span>   <span style="color:#0000ff">else</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">173</span>      <span style="color:#008200">// browser does not support frames</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">174</span>      document.getElementById(<span style="color:#0000ff">this</span>.ImgID).src = <span style="color:#0000ff">this</span>.Images[<span style="color:#0000ff">this</span>.CurrentImageIndex].src;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">175</span>   
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">176</span>   <span style="color:#008200">// Auto re-center and re-size the busy box.  This will force the busy box to </span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">177</span>   <span style="color:#008200">// always appear in the center of the window even if the user scrolls.</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">178</span>   <span style="color:#0000ff">this</span>.Resize();
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">179</span>   <span style="color:#0000ff">this</span>.Center();
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">180</span>   
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">181</span>   <span style="color:#008200">// Increment the current image index</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">182</span>   <span style="color:#0000ff">this</span>.CurrentImageIndex = (<span style="color:#0000ff">this</span>.CurrentImageIndex + 1)%<span style="color:#0000ff">this</span>.ImageCount;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">183</span>   
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">184</span>   <span style="color:#008200">// Display the next image in (imageDelay value) milliseconds (i.e. 125)</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">185</span>   <span style="color:#0000ff">this</span>.timeout_id = setTimeout(<span style="color:#0000ff">this</span>.VarName + <span style="color:#848284">&quot;.Animate();&quot;</span>, <span style="color:#0000ff">this</span>.ImageDelay);
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">186</span>}
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">187</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">188</span>BusyBox.prototype.StartAnimate = function()
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">189</span>{
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">190</span>   <span style="color:#0000ff">if</span>( <span style="color:#0000ff">this</span>.IsAnimating() )
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">191</span>      <span style="color:#0000ff">return</span>;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">192</span>   
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">193</span>   <span style="color:#0000ff">this</span>.Animate();
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">194</span>}
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">195</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">196</span>BusyBox.prototype.StopAnimate = function()
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">197</span>{
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">198</span>   clearTimeout(<span style="color:#0000ff">this</span>.timeout_id);
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">199</span>   <span style="color:#0000ff">this</span>.timeout_id = <span style="color:#0000ff">null</span>;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">200</span>}
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">201</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">202</span>BusyBox.prototype.Hide = function()
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">203</span>{   
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">204</span>   <span style="color:#0000ff">this</span>.StopAnimate();
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">205</span>   
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">206</span>   <span style="color:#008200">// Hide the busy box.</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">207</span>   <span style="color:#0000ff">this</span>.IFrame.style.visibility = <span style="color:#848284">&quot;hidden&quot;</span>;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">208</span>   <span style="color:#0000ff">this</span>.IFrame.style.width = 0;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">209</span>   <span style="color:#0000ff">this</span>.IFrame.style.height = 0;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">210</span>}
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">211</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">212</span>BusyBox.prototype.Show = function()
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">213</span>{
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">214</span>   <span style="color:#0000ff">if</span>( !<span style="color:#0000ff">this</span>.Enabled )
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">215</span>      <span style="color:#0000ff">return</span>;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">216</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">217</span>   <span style="color:#0000ff">if</span>( <span style="color:#0000ff">this</span>.IsAnimating() || <span style="color:#0000ff">this</span>.IsVisible() )
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">218</span>      <span style="color:#0000ff">return</span>;   
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">219</span>   
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">220</span>   <span style="color:#0000ff">this</span>.Resize();
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">221</span>   <span style="color:#0000ff">this</span>.Center();
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">222</span>   
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">223</span>   <span style="color:#008200">// Set the busy box to be visible and make sure it is on top of all other controls.	</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">224</span>   <span style="color:#0000ff">this</span>.IFrame.style.visibility = <span style="color:#848284">&quot;visible&quot;</span>;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">225</span>   <span style="color:#0000ff">this</span>.IFrame.style.zIndex = <span style="color:#848284">&quot;999999&quot;</span>;
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">226</span>   
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">227</span>   <span style="color:#008200">// Start the animation</span>
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">228</span>   <span style="color:#0000ff">this</span>.StartAnimate();
<span style="text-align:right;background-color:#e5e5e5;width:40px;color:#008284;margin-right:10px;border-right:#999999 1px solid">229</span></pre></div>
<p></p>
<p><font size=5>The .ASPX (HTML) Code</font></p>
<p>The required code in the .aspx or html page is quite small and consists of four pieces of code. </p>
<p>The first html piece is the <em>onbeforeunload</em> event on the <em>body</em> tag.  This event is fired just before a page is unloaded.  This includes post-back and hyperlinks to other pages.  In the <em>onbeforeunload</em> event we place the JavaScript to display the Busy Box to the user prior to any action that results in leaving this page or reloading it. </p>
<p>Discuss how to use a SPAN tag around buttons or links instead of the <em>onbeforeunload</em> event of the <em>body</em> tag.</p>
<p>The second html piece is simply the reference to the JavaScript class defining the BusyBox class, which is used to display and animate the busy box. </p>
<p>The third html piece instantiates my BusyBox object and assigns it to my working variable named busyBox.  My sample uses four images and each image is displayed for 125 milliseconds with a width of 147 and height of 206. </p>
<p>Example:<br>var busyBox = new BusyBox(&quot;BusyBoxIFrame&quot;, &quot;busyBox&quot;, 4, &quot;images/gears_ani_&quot;, &quot;.gif&quot;, 125, 147, 206)</p>
<p>The fourth html piece is my Busy Box <em>iframe</em> tag.  The <em>iframe</em> is used to contain the BusyBox layout.  The BusyBox layout is nothing more than a <em>div</em> tag containing an <em>img</em> tag.  The size, color, and content of this busy box are completely up to you.  This allows you to create a busy box that is as generic or personalized as your site needs.  There are two important components in a busy box, the  <em>div</em> tag and the embedded <em>img</em> tag.  These two tags must contain the same id’s defined in the BusyBox JavaScript object properties DivID and ImgID.  The default values for these two properties are “BusyBoxDiv” for DivID, and “BusyBoxImg” for the ImgID property.  Assigning your html  <em>div</em> and <em>img</em> tags with these id values is the easiest.  However, you may assign any id you wish; however, you will need to assign your custom values to the <em>busybox</em>.DivID and <em>busybox</em>.ImgID properties immediately after the instantiation of your busybox JavaScript object.</p>
<p><font size=4>Sample .ASPX (HTML)</font></p>
<div style="width:100%;overflow:scroll"><pre><span style="color:#0000ff">&lt;</span><span style="color:#800000">body</span><span style="color:#ff0000"> onbeforeunload<span style="color:#0000ff">=&quot;busyBox.Show();&quot;</span></span><span style="color:#0000ff">&gt;</span>
	<span style="color:#0000ff">&lt;</span><span style="color:#800000">script</span><span style="color:#ff0000"> language<span style="color:#0000ff">=&quot;javascript&quot;</span> type<span style="color:#0000ff">=&quot;text/javascript&quot;</span> src<span style="color:#0000ff">=&quot;CastleBusyBox.js&quot;</span></span><span style="color:#0000ff">&gt;</span><span style="color:#0000ff">&lt;/</span><span style="color:#800000">script</span><span style="color:#0000ff">&gt;</span>
	<span style="color:#0000ff">&lt;</span><span style="color:#800000">form</span><span style="color:#0000ff">&gt;</span>
		<span style="color:#0000ff">&lt;</span><span style="color:#800000">P</span><span style="color:#0000ff">&gt;</span>
			[Your Page Specific Content Here]
			<span style="color:#0000ff">&lt;</span><span style="color:#800000">iframe</span><span style="color:#ff0000"> id<span style="color:#0000ff">=&quot;BusyBox1&quot;</span> name<span style="color:#0000ff">=&quot;BusyBox1&quot;</span> frameBorder<span style="color:#0000ff">=&quot;0&quot;</span> scrolling<span style="color:#0000ff">=&quot;no&quot;</span> 
				ondrop<span style="color:#0000ff">=&quot;return false;&quot;</span></span><span style="color:#0000ff">&gt;</span><span style="color:#0000ff">&lt;/</span><span style="color:#800000">iframe</span><span style="color:#0000ff">&gt;</span><span style="color:#0000ff">&lt;/</span><span style="color:#800000">P</span><span style="color:#0000ff">&gt;</span>
		<span style="color:#0000ff">&lt;</span><span style="color:#800000">P</span><span style="color:#0000ff">&gt;</span>
			<span style="color:#0000ff">&lt;</span><span style="color:#800000">INPUT</span><span style="color:#ff0000"> id<span style="color:#0000ff">=&quot;Submit1&quot;</span> type<span style="color:#0000ff">=&quot;submit&quot;</span> value<span style="color:#0000ff">=&quot;Submit&quot;</span> name<span style="color:#0000ff">=&quot;Submit1&quot;</span></span><span style="color:#0000ff">&gt;</span><span style="color:#0000ff">&lt;/</span><span style="color:#800000">P</span><span style="color:#0000ff">&gt;</span>
		<span style="color:#0000ff">&lt;</span><span style="color:#800000">script</span><span style="color:#ff0000"> language<span style="color:#0000ff">=&quot;javascript&quot;</span> type<span style="color:#0000ff">=&quot;text/javascript&quot;</span></span><span style="color:#0000ff">&gt;</span>
		// Instantiate BusyBox object
		var busyBox = 
			new BusyBox(&quot;BusyBox1&quot;, &quot;busyBox&quot;, 4, &quot;images/gears_ani_&quot;, &quot;.gif&quot;, 125, 147, 207);
		<span style="color:#0000ff">&lt;/</span><span style="color:#800000">script</span><span style="color:#0000ff">&gt;</span>
	<span style="color:#0000ff">&lt;/</span><span style="color:#800000">form</span><span style="color:#0000ff">&gt;</span>
<span style="color:#0000ff">&lt;/</span><span style="color:#800000">body</span><span style="color:#0000ff">&gt;</span></pre></div>
<p><font size=4>Alternatives to Using the OnBeforeUnload Event</font></p>
<p>The <em>onbeforeunload</em> is supported by Internet Explorer 6, Netscape 7.2 (not 7.1), and Firefox 1.0.  The <em>onbeforeunload</em> event may not be the best solution for your particular needs.  Another solution is to place the <em>busybox.Show()</em> method in the <em>onclick</em> event of the html elements (button, link etc.) that need to cause the busy box to appear.  If the particular html tag does not have an <em>onclick</em> event, you can wrap your control in a <em>span</em> tag and use the <em>onclick</em> event of the <em>span</em> tag.  I use this all the time. </p>
<p>Example:</p><pre><span style="color:#0000ff">&lt;</span><span style="color:#800000">span</span><span style="color:#ff0000"> onclick<span style="color:#0000ff">=&quot;busyBox.Show();&quot;</span></span><span style="color:#0000ff">&gt;</span>
	<span style="color:#0000ff">&lt;</span><span style="color:#800000">a</span><span style="color:#ff0000"> href<span style="color:#0000ff">=&quot;anypage.htm&quot;</span></span><span style="color:#0000ff">&gt;</span>Any Page<span style="color:#0000ff">&lt;/</span><span style="color:#800000">a</span><span style="color:#0000ff">&gt;</span>
<span style="color:#0000ff">&lt;/</span><span style="color:#800000">span</span><span style="color:#0000ff">&gt;</span></pre>
<p>This allows you to specifically control which buttons and/or links cause the busy box to appear.</p>
<p>Another issue surfaced by users of the pervious version was the busy box appearing and remaining on the screen when a popup window was launched.  This assumes your are using the <em>onbeforeunload</em> event, and you want to prevent the busy box from appearing.  You can prevent this from happening by placing a &quot;return false;&quot; after the popup statement in your javascript event code.</p>
<p>Example:</p><pre><span style="color:#0000ff">&lt;</span><span style="color:#800000">A</span><span style="color:#ff0000"> onclick<span style="color:#0000ff">=&quot;window.open('anypage.htm'); return false;&quot;</span> href<span style="color:#0000ff">=&quot;#&quot;</span></span><span style="color:#0000ff">&gt;</span> Open window<span style="color:#0000ff">&lt;/</span><span style="color:#800000">A</span><span style="color:#0000ff">&gt;</span></pre>
<p><font size=5>Creating a BusyBox Web Control</font><br>I have created an ASP.NET web control to allow for easy use in ASP.NET pages.  You can find the control in my BusyBox Web Control article - to be posted shortly with a link insterted here.</p></div></div></div></div>
<div><b>Category:</b> Code Samples;JavaScript</div>
<div><b>Published:</b> 12/20/2004 1:19 PM</div>
<div><b>Title:</b> Building a Better Busy Box - Ver 1.2</div>
<div><b>Attachments:</b> <a href="http://www.crsw.com/mark/Lists/Posts/Attachments/16/BusyBox1.2Demo_1F02AEA4.zip">http://www.crsw.com/mark/Lists/Posts/Attachments/16/BusyBox1.2Demo_1F02AEA4.zip</a><br><a href=""></a></div>
]]></description>
      <author>Mark</author>
      <category>Code Samples;JavaScript</category>
      <pubDate>Tue, 24 Apr 2007 19:25:18 GMT</pubDate>
      <guid isPermaLink="true">http://www.crsw.com/mark/Lists/Posts/ViewPost.aspx?ID=16</guid>
    </item>
    <item>
      <title>Cogitation Blue skin for .Text version 0.95 - Updated as of 2004.05.06</title>
      <link>http://www.crsw.com/mark/Lists/Posts/ViewPost.aspx?ID=68</link>
      <description><![CDATA[<div><b>Body:</b> <div class=ExternalClassD1827EF667A04CB89D94B630FB36D4C0><p class=ExternalClass49A8E854FF5E4899945C0F08DC732ADC><strong>Article Source: <a title="http://www.crsw.com/mark/Lists/Posts/Post.aspx?ID=68" href="/mark/Lists/Posts/Post.aspx?ID=68">http://www.crsw.com/mark/Lists/Posts/Post.aspx?ID=68</a></strong> <p class=ExternalClass49A8E854FF5E4899945C0F08DC732ADC><strong>(Original Article Source: <a title="http://blogs.crsw.com/mark/articles/152.aspx" href="http://blogs.crsw.com/mark/articles/152.aspx">http://blogs.crsw.com/mark/articles/152.aspx</a></strong>) <p class=ExternalClass49A8E854FF5E4899945C0F08DC732ADC><strong>Cogitation Blue skin for .Text 0.95</strong>  <p class=ExternalClass49A8E854FF5E4899945C0F08DC732ADC><a href="/mark/Lists/Posts/Attachments/68/CogitationBlue300_2_343EEB66.gif"><img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px" title=Cogitation-Blue-300 border=0 alt=Cogitation-Blue-300 src="/mark/Lists/Posts/Attachments/68/CogitationBlue300_thumb_1F4D68F3.gif" width=304 height=246></a>  <p class=ExternalClass49A8E854FF5E4899945C0F08DC732ADC>Download the Cogitation skin for .Text.  This has been written for .Text version 0.95.  Please report any problems or suggestions.  Your feedback is appreciated.  <p class=ExternalClass49A8E854FF5E4899945C0F08DC732ADC><strong>Download Files:</strong>  <div class=ExternalClass49A8E854FF5E4899945C0F08DC732ADC> <ul> <div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:d26dcdd9-e61a-48e4-8e1f-5e4f4b12d313" class=wlWriterEditableSmartContent><p>Download: <a href="/mark/Lists/Posts/Attachments/68/Cogitationv0.9520040506_696EFEB4.zip">.Text Cogitation Blue Skin (Updated as of May 6, 2004)</a></p></div></ul></div> <p><strong>Updates:</strong>  <ol> <li>Changed the style (.css) files to use relative font sizes  <li>Minor border and margin padding changes.  <li>Replaced the “(rss)“ text with the orange “xml“ image in the left links column.  <li>Miscellaneous small changes to easily facilitate additional color schemes (to come soon).  <li>Included the new suggested .Text Skin logo which appears at the bottom of the skinned .Text site.</li></ol> <p><strong>Installation:</strong>  <ol> <li>Extract the zip file into the “<strong>/DotTextWeb/Skins/Cogitation</strong>” folder.  <li>Add the following line of code to the “<strong>/DotTextWeb/Admin/Skins.config</strong>” file.<br><code>&lt;SkinTemplate SkinID=&quot;<b>Cogitation</b>&quot; Skin=&quot;<b>Cogitation</b>&quot; /&gt;</code>  <li>Copy the “<strong>/Skins/Cogitation/Images/xmlsmall.gif”</strong> file to the root of your .Text web site folder.  <li>Finally, be sure to post back and let me know if and where you use it.  Thanks!</li></ol></div></div>
<div><b>Published:</b> 2/15/2004 10:30 PM</div>
<div><b>Title:</b> Cogitation Blue skin for .Text version 0.95 - Updated as of 2004.05.06</div>
<div><b>Attachments:</b> <a href="http://www.crsw.com/mark/Lists/Posts/Attachments/68/CogitationBlue300_2_343EEB66.gif">http://www.crsw.com/mark/Lists/Posts/Attachments/68/CogitationBlue300_2_343EEB66.gif</a><br><a href="http://www.crsw.com/mark/Lists/Posts/Attachments/68/CogitationBlue300_thumb_1F4D68F3.gif">http://www.crsw.com/mark/Lists/Posts/Attachments/68/CogitationBlue300_thumb_1F4D68F3.gif</a><br><a href="http://www.crsw.com/mark/Lists/Posts/Attachments/68/Cogitationv0.9520040506_696EFEB4.zip">http://www.crsw.com/mark/Lists/Posts/Attachments/68/Cogitationv0.9520040506_696EFEB4.zip</a><br><a href=""></a></div>
]]></description>
      <author>Mark Wagner</author>
      <pubDate>Sun, 19 Apr 2009 05:32:48 GMT</pubDate>
      <guid isPermaLink="true">http://www.crsw.com/mark/Lists/Posts/ViewPost.aspx?ID=68</guid>
    </item>
    <item>
      <title>Mutable or Immutable? (String and StringBuilder)</title>
      <link>http://www.crsw.com/mark/Lists/Posts/ViewPost.aspx?ID=84</link>
      <description><![CDATA[<div><b>Body:</b> <div class=ExternalClass89B9DBAEDBD04E8981F4593AC1D08347>
<p>An object qualifies as being called immutable if its value cannot be modified once it has been created. For example, methods that appear to modify a <b>String</b> actually return a new <b>String</b> containing the modification.  Developers are modifying strings all the time in their code.  This may appear to the developer as mutable - but it is not.  What actually happens is your string variable/object has been changed to reference a new string value containing the results of your new string value.  For this very reason .NET has the <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemtextstringbuilderclasstopic.asp">System.Text.StringBuilder</a> class.  If you find it necessary to modify the actual contents of a string-like object heavily, such as in a <em>for</em> or <em>foreach</em> loop, use the <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemtextstringbuilderclasstopic.asp">System.Text.StringBuilder</a> class. 
<p>Vladimir Roubtsov has an excellent <a href="http://www.javaworld.com/javaworld/javaqa/2002-12/01-qa-1206-immutable.html">article</a> the covers this topic in more detail.</p></div></div>
<div><b>Category:</b> C#</div>
<div><b>Published:</b> 8/6/2004 12:18 AM</div>
<div><b>Title:</b> Mutable or Immutable? (String and StringBuilder)</div>
]]></description>
      <author>Mark Wagner</author>
      <category>C#</category>
      <pubDate>Sun, 19 Apr 2009 06:21:23 GMT</pubDate>
      <guid isPermaLink="true">http://www.crsw.com/mark/Lists/Posts/ViewPost.aspx?ID=84</guid>
    </item>
    <item>
      <title>Web Part Package Installer for Windows SharePoint Services 2003</title>
      <link>http://www.crsw.com/mark/Lists/Posts/ViewPost.aspx?ID=66</link>
      <description><![CDATA[<div><b>Body:</b> <div class=ExternalClassABF0F94346B4486AA1351A5E9AACE0A2><p class=ExternalClass95A4533BA44F4200A23DB05602DCDA92>(re-post from my original blog)  <p class=ExternalClass95A4533BA44F4200A23DB05602DCDA92><a href="http://blogs.crsw.com/mark">Mark Wagner</a></a><br><a href="/mark">http://www.crsw.com/mark</a> (Old Blog Source: <a href="http://blogs.crsw.com/mark">http://blogs.crsw.com/mark</a>)<br>June 20, 2005  <p class=ExternalClass95A4533BA44F4200A23DB05602DCDA92>Article source: <a href="http://blogs.crsw.com/mark/articles/1100.aspx">http://blogs.crsw.com/mark/articles/1100.aspx</a>  <p class=ExternalClass95A4533BA44F4200A23DB05602DCDA92>For those of us who are familiar with installing and removing SharePoint web parts, it’s a pretty easy process. However, for those individuals who spend more time <em>using</em> SharePoint than installing and configuring it; locating and using the STSADM command can be a bit tedious. To help simplify the installation of web parts, I have created a simple Web Part Package Installer program.  <p class=ExternalClass95A4533BA44F4200A23DB05602DCDA92>The purpose of this program is to make the installation of web part packages much easier for less-technical people. Web Part Packages are stored in files having a .CAB file extension. The nice thing about a web part package is that a package can define some initial properties and configuration settings for the web part being installed. This is where my Web Part Package Installer program may be useful.  <p class=ExternalClass95A4533BA44F4200A23DB05602DCDA92>The Web Part Package Installer program will only install web part packages. <b>The Web Part Package Installer will not install a web part using a web part description (.dwp) file, or a web part assembly (.dll) file. </b>If you only have a web part assembly file, I highly recommend using the <a href="http://www.bluedoglimited.com/SharePointThoughts/ViewPost.aspx?id=13">InstallAssemblies</a> program by <a href="http://www.BlueDogLimited.com/Downloads">Blue Dog Limited</a>.  <p class=ExternalClass95A4533BA44F4200A23DB05602DCDA92><b>Use At Your Own Risk</b>  <p class=ExternalClass95A4533BA44F4200A23DB05602DCDA92>There is no warranty express or implied. You may use it free of charge.  <p class=ExternalClass95A4533BA44F4200A23DB05602DCDA92><b>Download Files</b> <blockquote> <div class=ExternalClass95A4533BA44F4200A23DB05602DCDA92> <div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:2c718167-6056-42d9-a47c-8c25ccdcde7f" class=wlWriterEditableSmartContent><p>Download: <a href="/mark/Lists/Posts/Attachments/66/WebPartPackageInstaller_75C42025.zip">Web Part Package Installer setup</a></p></div></div></blockquote> <p class=ExternalClass95A4533BA44F4200A23DB05602DCDA92><b>Installing the Web Part Package Installer </b> <p class=ExternalClass95A4533BA44F4200A23DB05602DCDA92>Before you can use the Web Part Package Installer program, you must download and run the Web Part Package Installer Setup program.  The Web Part Package Installer must be installed on your SharePoint web server.  <div class=ExternalClass95A4533BA44F4200A23DB05602DCDA92> <ul> <li> <p>Logon directly to your SharePoint web server with administrator access. If you do not have administrator access to your SharePoint web server, then you need to contact your SharePoint administrator before you may proceed.</p> <li> <p>Run the Web Part Package Installer Setup program and follow the setup dialogs until the setup process is done.</p> <li> <p>You should now have a new program on your Start &gt; All Program &gt; Castle Rock Software menu with the name of Web Part Installer.</p> <li> <p>Your Web Part Installer is now ready for use.</p></li></ul></div> <p><b>Using the Web Part Package Installer  <p></b> <p>The Web Part Package Installer is a very simple program. Before you can install any web parts you must make sure you are logged on to your SharePoint web server as a user with full rights to administer SharePoint.  <p>Start the Web Part Package Installer program. To do this, go to the <b>Start &gt; All Programs &gt; Castle Rock Software &gt; Web Part Package Installer</b> menu option.  <ul> <li>The installer form is very simple.<br><a href="/mark/Lists/Posts/Attachments/66/WPPI_2_5FE6BB74.jpg"><img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px" title=WPPI border=0 alt=WPPI src="/mark/Lists/Posts/Attachments/66/WPPI_thumb_5FE6BB74.jpg" width=354 height=182></a> <br> <li> <p>Select the web part package (.cab) file to install to clicking the ellipse (<b>…</b>) button.</p> <li> <p>The “Overwrite an existing Web Part Package” option is usually not needed. You should normally leave this option un-checked. You only need to check this option if you want to replace the existing web part. This is usually only needed when an older version of a web part already exists on this web server.</p> <li> <p>When you are ready click the “Install Web Part Package” button. The web part has been successfully installed when you receive a message saying the web part is “Deploying”. Here is an example of the success message. Your message will be slightly different depending on the name of your server.<br><a href="/mark/Lists/Posts/Attachments/66/WPPIFail_2_0DD40E2D.jpg"><img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px" title=WPPI-Fail border=0 alt=WPPI-Fail src="/mark/Lists/Posts/Attachments/66/WPPIFail_thumb_0DD40E2D.jpg" width=403 height=118></a>  </p> <li> <p>If you receive a message like this instead, your web part package was not installed.<br><a href="/mark/Lists/Posts/Attachments/66/WPPISuccess_2_0DD40E2D.jpg"><img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px" title=WPPI-Success border=0 alt=WPPI-Success src="/mark/Lists/Posts/Attachments/66/WPPISuccess_thumb_0DD40E2D.jpg" width=309 height=117></a><br>This message is indicating that a copy of the web part you are trying to install already exists on this server.  You can replace the existing web part package by selecting the “Overwrite..“ option.</p></li></ul> <p>The web part should now be available to add to your page(s) using the standard drag-and-drop normally used in SharePoint.  </div></div>
<div><b>Category:</b> SharePoint;Tools;Administration</div>
<div><b>Published:</b> 6/20/2005 1:41 PM</div>
<div><b>Title:</b> Web Part Package Installer for Windows SharePoint Services 2003</div>
<div><b>Attachments:</b> <a href="http://www.crsw.com/mark/Lists/Posts/Attachments/66/downloaddisk_2_5FE6BB74.gif">http://www.crsw.com/mark/Lists/Posts/Attachments/66/downloaddisk_2_5FE6BB74.gif</a><br><a href="http://www.crsw.com/mark/Lists/Posts/Attachments/66/downloaddisk_thumb_5FE6BB74.gif">http://www.crsw.com/mark/Lists/Posts/Attachments/66/downloaddisk_thumb_5FE6BB74.gif</a><br><a href="http://www.crsw.com/mark/Lists/Posts/Attachments/66/WebPartPackageInstaller_75C42025.zip">http://www.crsw.com/mark/Lists/Posts/Attachments/66/WebPartPackageInstaller_75C42025.zip</a><br><a href="http://www.crsw.com/mark/Lists/Posts/Attachments/66/WPPI_2_5FE6BB74.jpg">http://www.crsw.com/mark/Lists/Posts/Attachments/66/WPPI_2_5FE6BB74.jpg</a><br><a href="http://www.crsw.com/mark/Lists/Posts/Attachments/66/WPPI_thumb_5FE6BB74.jpg">http://www.crsw.com/mark/Lists/Posts/Attachments/66/WPPI_thumb_5FE6BB74.jpg</a><br><a href="http://www.crsw.com/mark/Lists/Posts/Attachments/66/WPPIFail_2_0DD40E2D.jpg">http://www.crsw.com/mark/Lists/Posts/Attachments/66/WPPIFail_2_0DD40E2D.jpg</a><br><a href="http://www.crsw.com/mark/Lists/Posts/Attachments/66/WPPIFail_thumb_0DD40E2D.jpg">http://www.crsw.com/mark/Lists/Posts/Attachments/66/WPPIFail_thumb_0DD40E2D.jpg</a><br><a href="http://www.crsw.com/mark/Lists/Posts/Attachments/66/WPPISuccess_2_0DD40E2D.jpg">http://www.crsw.com/mark/Lists/Posts/Attachments/66/WPPISuccess_2_0DD40E2D.jpg</a><br><a href="http://www.crsw.com/mark/Lists/Posts/Attachments/66/WPPISuccess_thumb_0DD40E2D.jpg">http://www.crsw.com/mark/Lists/Posts/Attachments/66/WPPISuccess_thumb_0DD40E2D.jpg</a><br><a href=""></a></div>
]]></description>
      <author>Mark Wagner</author>
      <category>SharePoint;Tools;Administration</category>
      <pubDate>Sun, 19 Apr 2009 05:21:25 GMT</pubDate>
      <guid isPermaLink="true">http://www.crsw.com/mark/Lists/Posts/ViewPost.aspx?ID=66</guid>
    </item>
    <item>
      <title>Google Search Web Part</title>
      <link>http://www.crsw.com/mark/Lists/Posts/ViewPost.aspx?ID=64</link>
      <description><![CDATA[<div><b>Body:</b> <div class=ExternalClass323A465255194EFB9148DEEA20EE5909><div class=ExternalClass7E4F396AA27F46D5AC46AAD9726F75B9> <p><strong>Google Search Web Part</strong>  <p><a href="http://blogs.crsw.com/mark">Mark Wagner</a><br><a href="http://blogs.crsw.com/mark">http://blogs.crsw.com/mark</a><br>June 10, 2005  <p>Article: <a href="http://blogs.crsw.com/mark/articles/1009.aspx">http://blogs.crsw.com/mark/articles/1009.aspx</a>  <p><strong>Update: June 20, 2005</strong><br>For those of you who need assistance with installing this web part, you can use my <a href="http://blogs.crsw.com/mark/articles/1100.aspx">Web Part Package Installer</a> program.  This installer program makes installing a web part package very easy.  <p><b>Downloads <br></b>I have provided two downloads.</p> <div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:048224f7-4e8c-430a-9bd1-5e47b7c20065" class=wlWriterEditableSmartContent><p>Download: <a href="/mark/Lists/Posts/Attachments/64/GoogleSearchWebPartSource_1_43DAC190.zip">Google Search Web Part Package</a><br>Download: <a href="/mark/Lists/Posts/Attachments/64/GoogleSearchWebPartPackage_1_43DAC190.zip">Google Search Web Part Source</a></p></div> <p>I created a custom Google web part a few weeks ago for my demo SharePoint site.  You can see what it looks like on my testing SharePoint home page <a href="http://sharepoint.crsw.com/">http://sharepoint.crsw.com</a>.  The Google web part submits a search request by navigating the user directly to the Google search web page and performs a Google search using the Google search engine. I have since received a number of emails requesting to get this web part for use on their SharePoint sites.  <p><i>First and foremost, the </i><i>Google name and search service are the property of Google. I have no affiliation with the Google name and its services.  <p></i> <p>Google is a must-have resource for my daily work. If I need to find something, I Google it, and nothing else comes close when searching on the Internet. With this <i>dependency</i>, I had to have it on my new SharePoint demo site.  My SharePoint demo site is more of a test-harness at this point since it is hosted on a shared/public server, so don’t be too disappointed when you see it.  <p>For those of you not familiar with Google, welcome to the Internet. Google is the single best Internet search service available on the Internet, for the Internet. If you need to find something on the Internet, Google will find it for you. This process of searching is commonly referred to Googling. If you <i>Google</i> something, your are using Google to search the Internet for it. For the rest of you, Google is probably how you found this article.  <p>It is important to remember that this Google Search web part is not intended to replace the SharePoint search feature. In order for Google to find any results, Google must have already searched and indexed your site. Also remember that Google will not be able to crawl and index pages on your SharePoint site that are not accessible to the public. This is where the SharePoint search has the upper hand. Again, this web part is not intended to replace the SharePoint search feature, but to conveniently access the much used Google search from your SharePoint page.  <p><b>Configuring the Google Search Web Part </b> <p>Here is a picture of the web part configurations.  <p><a href="/mark/Lists/Posts/Attachments/64/GoogleSearchWPConfig_2_15CC65D9.jpg"><img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px" title=GoogleSearchWP-Config border=0 alt=GoogleSearchWP-Config src="/mark/Lists/Posts/Attachments/64/GoogleSearchWPConfig_thumb_15CC65D9.jpg" width=249 height=184></a>  <p><b>Google Image URL  <p></b> <p>Once you have installed the web part, in the configuration options of the web part is a Google Image URL property which defaults to an image on Google’s web site.  You should use the default url for the Google image. I have made this property available just in case Google renames or moves their image.  <p>This Google Search Web Part can be configured in three distinct ways.  <p><strong><br>Standard Google Search</strong>  <p><a href="/mark/Lists/Posts/Attachments/64/GoogleSearchWP_2_0B6F057C.jpg"><img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px" title=GoogleSearchWP border=0 alt=GoogleSearchWP src="/mark/Lists/Posts/Attachments/64/GoogleSearchWP_thumb_0B6F057C.jpg" width=215 height=107></a>  <p><strong></strong> <p><strong>Local Site Search </strong> <p><a href="/mark/Lists/Posts/Attachments/64/GoogleSearchWPLocal_2_0B6F057C.jpg"><img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px" title=GoogleSearchWP-Local border=0 alt=GoogleSearchWP-Local src="/mark/Lists/Posts/Attachments/64/GoogleSearchWPLocal_thumb_0B6F057C.jpg" width=215 height=111></a>  <p><strong>Custom Site Search</strong>  <p><a href="/mark/Lists/Posts/Attachments/64/GoogleSearchWPCustom_2_0B6F057C.jpg"><img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px" title=GoogleSearchWP-Custom border=0 alt=GoogleSearchWP-Custom src="/mark/Lists/Posts/Attachments/64/GoogleSearchWPCustom_thumb_0B6F057C.jpg" width=215 height=111></a>  <p><strong>Standard Google search</strong><br>The standard search performs a normal Google search just as if you went to the Google web site and entered your search criteria.  <p><strong>Local Site Search (Using Google)</strong><br>The local site check box is used to limit the Google search results to return only content that resides within the current site URL. The local site URL will be displayed in the Google Search Web Part to make this clear to the user. This allows the Google Web part to use the current site URL as the search scope. To be clear, the Google search engine is used to search for results for only those web pages that have the same domain as the current page.  <p>Important Note: The Local Site check box may not stay checked. If this is the case, this is intentionally being unchecked by the web part when you save because the mechanism used to obtain the local site URL is not allowed due to the current security restrictions on SharePoint server. You will either need to have the server administrator grant the necessary access, or simply not use this option.  <p><strong>Custom Site URL (Using Google)</strong><br>If you specify a custom URL, the custom URL is used to narrow the Google search results to return only the results that are located on the specified custom site/URL.  <p><b>About the Downloads  <p></b> <p>The compiled assembly and web part package have been built with a strong name and therefore can be installed in the GAC if needed. This also allows for this assembly to be configured and used on SharePoint servers that have tighter security. If you are unable to compile, or simply wish to use my assembly, you can do so with the confidence knowing the full assembly name (including the version, public token, etc.) will only work with the compiled assembly I have provided in the web part package (.cab) file.  <p>The source code is also available in a separate download; however, I have removed the Strong Name Key file to keep my compiled version secure from any bogus impersonators. You will need to create your own strong name key file and update the necessary manifest and web part description (.dwp) file to successfully deploy your web part assembly to your SharePoint server. For those who are interested in how this web part has been written, you can view the source, modify, and build your own Google Search Web Part.  <p><b>How the Google Search Web Part works  <p></b> <p>This is a very simple web part. The entire Google search request is performed using the standard Google search URL along with a couple query string (URL) parameters.  <p>The Google Search URL accepts a number of parameters. The only two we are concerned with are the search criteria and; optionally the site URL scope. The search criteria is appended to the URL with the “q=” parameter. Additionally, the “site=” parameter allows us to optionally narrow the scope the of the search results to the site URL provided.  <p>Here is the base Google Search URL.  <p><a href="http://www.google.com/search">http://www.google.com/search</a>  <p>Here we have appended the search criteria to the URL.  <p><a href="http://www.google.com/search?q=mark+wagner+web+part">http://www.google.com/search?q=mark+wagner+web+part</a>  <p>Finally, we here we have the Google Search URL with the search criteria and the site scope added to the URL. This will only return results that meet my search criteria AND exist on the blogs.crsw.com/mark site.  <p><a href="http://www.google.com/search?q=web+part+site:blogs.crsw.com/mark">http://www.google.com/search?q=web+part+site:blogs.crsw.com/mark</a>  <p>This Google Search Web Part may be used – free. There is no implied warranty and you use it at your own risk. But how could you not.  <p><strong>Need Help Installing This Web Part?</strong>  <p>If you need help installing this web part package, try using my <a href="http://blogs.crsw.com/mark/articles/1100.aspx">Web Part Package Installer</a> program to make this process easy. </p></div></div></div>
<div><b>Category:</b> SharePoint;Search</div>
<div><b>Published:</b> 6/10/2005 10:06 AM</div>
<div><b>Title:</b> Google Search Web Part</div>
<div><b>Attachments:</b> <a href="http://www.crsw.com/mark/Lists/Posts/Attachments/64/GoogleSearchWebPartPackage_1_43DAC190.zip">http://www.crsw.com/mark/Lists/Posts/Attachments/64/GoogleSearchWebPartPackage_1_43DAC190.zip</a><br><a href="http://www.crsw.com/mark/Lists/Posts/Attachments/64/GoogleSearchWebPartPackage_15CB3B49.zip">http://www.crsw.com/mark/Lists/Posts/Attachments/64/GoogleSearchWebPartPackage_15CB3B49.zip</a><br><a href="http://www.crsw.com/mark/Lists/Posts/Attachments/64/GoogleSearchWebPartSource_1_43DAC190.zip">http://www.crsw.com/mark/Lists/Posts/Attachments/64/GoogleSearchWebPartSource_1_43DAC190.zip</a><br><a href="http://www.crsw.com/mark/Lists/Posts/Attachments/64/GoogleSearchWP_2_0B6F057C.jpg">http://www.crsw.com/mark/Lists/Posts/Attachments/64/GoogleSearchWP_2_0B6F057C.jpg</a><br><a href="http://www.crsw.com/mark/Lists/Posts/Attachments/64/GoogleSearchWP_thumb_0B6F057C.jpg">http://www.crsw.com/mark/Lists/Posts/Attachments/64/GoogleSearchWP_thumb_0B6F057C.jpg</a><br><a href="http://www.crsw.com/mark/Lists/Posts/Attachments/64/GoogleSearchWPConfig_2_15CC65D9.jpg">http://www.crsw.com/mark/Lists/Posts/Attachments/64/GoogleSearchWPConfig_2_15CC65D9.jpg</a><br><a href="http://www.crsw.com/mark/Lists/Posts/Attachments/64/GoogleSearchWPConfig_thumb_15CC65D9.jpg">http://www.crsw.com/mark/Lists/Posts/Attachments/64/GoogleSearchWPConfig_thumb_15CC65D9.jpg</a><br><a href="http://www.crsw.com/mark/Lists/Posts/Attachments/64/GoogleSearchWPCustom_2_0B6F057C.jpg">http://www.crsw.com/mark/Lists/Posts/Attachments/64/GoogleSearchWPCustom_2_0B6F057C.jpg</a><br><a href="http://www.crsw.com/mark/Lists/Posts/Attachments/64/GoogleSearchWPCustom_thumb_0B6F057C.jpg">http://www.crsw.com/mark/Lists/Posts/Attachments/64/GoogleSearchWPCustom_thumb_0B6F057C.jpg</a><br><a href="http://www.crsw.com/mark/Lists/Posts/Attachments/64/GoogleSearchWPLocal_2_0B6F057C.jpg">http://www.crsw.com/mark/Lists/Posts/Attachments/64/GoogleSearchWPLocal_2_0B6F057C.jpg</a><br><a href="http://www.crsw.com/mark/Lists/Posts/Attachments/64/GoogleSearchWPLocal_thumb_0B6F057C.jpg">http://www.crsw.com/mark/Lists/Posts/Attachments/64/GoogleSearchWPLocal_thumb_0B6F057C.jpg</a><br><a href=""></a></div>
]]></description>
      <author>Mark Wagner</author>
      <category>SharePoint;Search</category>
      <pubDate>Sun, 19 Apr 2009 04:00:36 GMT</pubDate>
      <guid isPermaLink="true">http://www.crsw.com/mark/Lists/Posts/ViewPost.aspx?ID=64</guid>
    </item>
    <item>
      <title>Trace.axd – Application Trace</title>
      <link>http://www.crsw.com/mark/Lists/Posts/ViewPost.aspx?ID=93</link>
      <description><![CDATA[<div><b>Body:</b> <div class=ExternalClass5CA4929678E3480EBF3BF6256AD8A0E5><p>The more you learn, the less you know. <p>Trying to keep up with the extensive areas of .NET and Microsoft products can easily bring you to this conclusion.  Its easy for us to continually focus on all the new technologies and versions (Whidbey and the .NET Framework 2.0) only to overlook some of the low hanging fruit - at least for me it is.  Remember, this is the “Simple Thoughts from a Simple Mind“ blog. ;) <p>One area I forgot about is the ASP.NET Trace - Trace.axd page.  As you may know, ASP.NET allows you to trace the processing for a single page or for all pages.  The trace output can be rendered at the end of each page.  Don't forget (as I did) there is also the Trace.axd page that provides a nice list of traced pages such as this. <p><a href="/mark/Lists/Posts/Attachments/93/TracePic1_2_319888AE.jpg"><img title=TracePic1 style="border-right:0px;border-top:0px;display:inline;border-left:0px;border-bottom:0px" height=328 alt=TracePic1 src="/mark/Lists/Posts/Attachments/93/TracePic1_thumb_319888AE.jpg" width=603 border=0></a>  <p>The web.config file needs only a small change to make this available. <p><a href="/mark/Lists/Posts/Attachments/93/TracePic2_2_319888AE.jpg"><img title=TracePic2 style="border-right:0px;border-top:0px;display:inline;border-left:0px;border-bottom:0px" height=93 alt=TracePic2 src="/mark/Lists/Posts/Attachments/93/TracePic2_thumb_319888AE.jpg" width=428 border=0></a>  <p>Clicking on the View Details link for a page process will present you with the familiar trace detail. </div></div>
<div><b>Category:</b> ASP.NET;Debugging</div>
<div><b>Published:</b> 4/6/2005 12:58 AM</div>
<div><b>Title:</b> Trace.axd – Application Trace</div>
<div><b>Attachments:</b> <a href="http://www.crsw.com/mark/Lists/Posts/Attachments/93/TracePic1_2_319888AE.jpg">http://www.crsw.com/mark/Lists/Posts/Attachments/93/TracePic1_2_319888AE.jpg</a><br><a href="http://www.crsw.com/mark/Lists/Posts/Attachments/93/TracePic1_thumb_319888AE.jpg">http://www.crsw.com/mark/Lists/Posts/Attachments/93/TracePic1_thumb_319888AE.jpg</a><br><a href="http://www.crsw.com/mark/Lists/Posts/Attachments/93/TracePic2_2_319888AE.jpg">http://www.crsw.com/mark/Lists/Posts/Attachments/93/TracePic2_2_319888AE.jpg</a><br><a href="http://www.crsw.com/mark/Lists/Posts/Attachments/93/TracePic2_thumb_319888AE.jpg">http://www.crsw.com/mark/Lists/Posts/Attachments/93/TracePic2_thumb_319888AE.jpg</a><br><a href=""></a></div>
]]></description>
      <author>Mark Wagner</author>
      <category>ASP.NET;Debugging</category>
      <pubDate>Sun, 19 Apr 2009 07:00:58 GMT</pubDate>
      <guid isPermaLink="true">http://www.crsw.com/mark/Lists/Posts/ViewPost.aspx?ID=93</guid>
    </item>
    <item>
      <title>Why C# is used more or preferred over VB.NET?</title>
      <link>http://www.crsw.com/mark/Lists/Posts/ViewPost.aspx?ID=92</link>
      <description><![CDATA[<div><b>Body:</b> <div class=ExternalClass43C58C4794B24A7DBF0E11B06A6FAD5E><p>I recently received a question from someone asking:<br><strong>Why C# is used more or preferred over VB.NET?</strong> <p>I believe the answer to this question has mostly to do with syntax and history.  <p>Although VB.NET is an excellent language, the problem with VB.NET has more to do with the history of BASIC than what VB.NET is today. I can tell you that I prefer C# over VB.NET, and I programmed with Visual Basic versions 3 through 6 with much success. However, as any ex-Visual Basic developer an attest to, Visual Basic was always viewed as a second-rate language by C++ and Java developers. There were certainly a number of things that the C++ language would allow over Visual Basic, and not all of them were necessarily positive. Much of the flexibility allowed by C++ was also the demise of many C++ applications.  <p>I viewed C++ like a surgeon’s scalpel. With a scalpel, it can take a long time to carve out a piece of art. And, in the wrong hands you can do more damage than good, as I have seen. However, in the right hands, you can do very good things. With C++ a developer could do virtually anything since C++ was the core language on which most operating systems were written, and the core for the Microsoft libraries. <p>Visual Basic was intended to address the need to rapidly develop applications for the largest share of applications needed, such as business applications. Business applications are more about good business process logic and intuitive user interfaces, not complex user interfaces or algorithms. Visual Basic was Microsoft's initial attempt at providing a development language to improve programmer productivity. Visual Basic addressed this need well. <p>With this little bit of history, programmers who used Visual Basic were not considered by some (C++ and Java developers) to be “professional” developers. The fact that Visual Basic had the word “Basic” in it was probably the single most dominating reason – in my opinion. Anything that is “Basic” is probably not powerful – as viewed by many who never really ever used Visual Basic. I must confess, I had the same biases about other database-related languages like FoxPro and DBase – and I was probably overly critical about those and other tools as well. <p>I personally have a great deal of respect for Visual Basic and its place in history. For me, it was the right tool for many solutions at that time. Visual Basic versions 3 through 6 existed during a time when companies were only beginning to see the advantages of Local Area Networks (LAN), the wide-spread introduction of the Internet and the explosion of the Internet, all of which happened during the timeline of Visual Basic. <p>If I may deviate a bit, during this time most companies; except for the large Fortune 1000 type companies), viewed personal computers and LAN’s as an expensive investment with very little return on investment (ROI). This close scrutiny of Information Technology investments eventually proved to be a good investment in productivity for the average company.  The investment in technology then began to swing the other direction at a pace where many companies and investors could not throw enough money into the advancement of technology and new technology companies; and as we all know, this ended with the DOT-COM boom and bust. <p>Back to the original question about VB.NET or C#. The important thing to remember is that both VB.NET and C# get their muscle from the .NET Framework. Other than a few minor differences in functionality between the two, the decision becomes mostly driven by syntax. I do not include functional because all .NET languages are interoperable with one another. Again this is provided by the .NET Framework.  I personally prefer the C# syntax. It is more like C++, JavaScript, and Java. Although I don’t use Java, I like developing in a syntax that is more widely adopted. I use JavaScript occasionally and as a creature of habit I like that C# and JavaScript are similar in basic syntax. I also prefer the terminology or keywords used by C# because they are more object oriented in nature.  <p>This is my preference from a non-technical approach. Your comments are welcome.</p></div></div>
<div><b>Category:</b> Questions;C#</div>
<div><b>Published:</b> 3/13/2005 11:52 PM</div>
<div><b>Title:</b> Why C# is used more or preferred over VB.NET?</div>
]]></description>
      <author>Mark Wagner</author>
      <category>Questions;C#</category>
      <pubDate>Sun, 19 Apr 2009 06:54:59 GMT</pubDate>
      <guid isPermaLink="true">http://www.crsw.com/mark/Lists/Posts/ViewPost.aspx?ID=92</guid>
    </item>
  </channel>
</rss>